本文整理匯總了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();
}