當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Resource::getParams方法代碼示例

本文整理匯總了PHP中Resource::getParams方法的典型用法代碼示例。如果您正苦於以下問題:PHP Resource::getParams方法的具體用法?PHP Resource::getParams怎麽用?PHP Resource::getParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Resource的用法示例。


在下文中一共展示了Resource::getParams方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 /**
  * @see AbstractController::run()
  */
 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $formParams = RequestManager::getAllParams();
     $uc = new UserPreferencesController();
     $uc->getUserPreference(Utils::getLoggedInUserId());
     $this->populateProgramData($uriParams, $formParams);
     $this->getView()->setViewName(self::MODULE_KEY)->display();
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:12,代碼來源:IndexController.php

示例2: run

 /**
  * @see AbstractController::run()
  */
 public function run(Resource $resource)
 {
     $inputParams = $resource->getParams();
     $pid = $inputParams[Constants::INPUT_PARAM_ACTION];
     if (!empty($pid)) {
         $this->downloadFile($pid);
     } else {
         throw new Exception("No File Info Provided!");
     }
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:13,代碼來源:DownloadController.php

示例3: run

 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $formParams = RequestManager::getAllParams();
     if (!empty($formParams[self::FILE_UPLOAD_ACTION_NAME]) && $formParams[self::FILE_UPLOAD_ACTION_NAME] == self::FILE_UPLOAD_ACTION_VALUE) {
         $this->uploadFile($formParams);
     } else {
         $this->getView()->setViewName(self::MODULE_KEY)->display();
     }
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:10,代碼來源:UploadController.php

示例4: run

 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $formParams = RequestManager::getAllParams();
     if (strtolower($uriParams[Constants::INPUT_PARAM_ACTION]) === 'save') {
         if ($this->saveUserPreference($formParams)) {
             Response::sendResponse(Constants::SUCCESS_RESPONSE, Messages::SUCCESS_UPDATE);
         } else {
             Response::sendResponse(Constants::SUCCESS_RESPONSE, Messages::ERROR_OPERATION_FAILED);
         }
     }
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:12,代碼來源:UserPreferencesController.php

示例5: run

 /**
  * @see AbstractController::run()
  */
 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $formParams = RequestManager::getAllParams();
     if ($this->isDeleteRequest($uriParams, $formParams)) {
         $pid = $uriParams[Constants::INPUT_PARAM_PID];
         if (!empty($pid) && is_numeric($pid)) {
             $this->deleteSource($pid);
         }
     } else {
         $pid = $uriParams[Constants::INPUT_PARAM_PID];
         $language = $uriParams[Constants::INPUT_PARAM_LANG];
         $category = $uriParams[Constants::INPUT_PARAM_CATE];
         $this->exploreCode($language, $category, $pid);
     }
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:19,代碼來源:ExplorerController.php

示例6: run

 /**
  * @see AbstractController::run()
  */
 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $formParams = RequestManager::getAllParams();
     if (!$this->isEditRequest($formParams)) {
         if (is_numeric($uriParams[Constants::INPUT_PARAM_ACTION])) {
             $this->setBean(array('pid' => $uriParams[Constants::INPUT_PARAM_ACTION]));
         } else {
             $this->setBean(array('pid' => null));
         }
         $this->getView()->setViewName(self::MODULE_KEY)->display();
     } else {
         if (!$this->isUpdateRequest($formParams)) {
             $this->getModel()->submitCode($formParams);
         } else {
             $this->getModel()->updateCode($formParams);
         }
     }
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:22,代碼來源:EditorController.php

示例7: run

 /**
  * @see AbstractController::run()
  */
 public function run(Resource $resource)
 {
     $uriParams = $resource->getParams();
     $contentKey = $uriParams[Constants::INPUT_PARAM_ACTION];
     $this->getView()->setViewName($contentKey)->display();
 }
開發者ID:Abhishek627,項目名稱:crux,代碼行數:9,代碼來源:ContentController.php


注:本文中的Resource::getParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。