本文整理汇总了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();
}
示例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!");
}
}
示例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();
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
}
示例7: run
/**
* @see AbstractController::run()
*/
public function run(Resource $resource)
{
$uriParams = $resource->getParams();
$contentKey = $uriParams[Constants::INPUT_PARAM_ACTION];
$this->getView()->setViewName($contentKey)->display();
}