当前位置: 首页>>代码示例>>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;未经允许,请勿转载。