当前位置: 首页>>代码示例>>PHP>>正文


PHP Am_Request::getParams方法代码示例

本文整理汇总了PHP中Am_Request::getParams方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Request::getParams方法的具体用法?PHP Am_Request::getParams怎么用?PHP Am_Request::getParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Am_Request的用法示例。


在下文中一共展示了Am_Request::getParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkPermissions

 /**
  * Throws exception if no permissions added
  * @param Am_Request $request
  * @param array $record 
  */
 public function checkPermissions(Am_Request $request, $alias, $method)
 {
     if ($this->getDi()->config->get('api_debug_mode')) {
         $this->getDi()->errorLogTable->log('REST API :' . var_export($request->getParams(), true));
     }
     $event = $this->getDi()->hook->call(Am_Event::API_CHECK_PERMISSIONS, array('request' => $request, 'alias' => $alias, 'method' => $method));
     foreach ($event->getReturn() as $return) {
         if ($return === true) {
             return;
         }
         // skip checks if allowed by hook
     }
     $s = $request->getFiltered('_key');
     if (empty($s) || strlen($s) < 10) {
         throw new Am_Exception_InputError("API Error 10001 - no [key] specified or key is too short");
     }
     $apikey = $this->getDi()->apiKeyTable->findFirstByKey($s);
     if (!$apikey || $apikey->is_disabled) {
         throw new Am_Exception_InputError("API Error 10002 - [key] is not found or disabled");
     }
     $perms = $apikey->getPerms();
     if (empty($perms[$alias][$method]) || !$perms[$alias][$method]) {
         throw new Am_Exception_InputError("API Error 10003 - no permissions for {$alias}-{$method} API call");
     }
 }
开发者ID:alexanderTsig,项目名称:arabic,代码行数:30,代码来源:Bootstrap.php

示例2: directAction

 public function directAction(Am_Request $request, Zend_Controller_Response_Http $response, array $invokeArgs)
 {
     if ($request->getActionName() == 'thanks') {
         if ($this->getConfig('debugLog')) {
             Am_Di::getInstance()->errorLogTable->log('NetBilling Form [response-thanks]:' . json_encode($request->getParams()));
         }
         $this->invoice = $this->getDi()->invoiceTable->findFirstByPublicId($request->getFiltered('Ecom_ConsumerOrderID'));
         $url = $request->get('Ecom_Ezic_Response_StatusCode') == 0 || $request->get('Ecom_Ezic_Response_StatusCode') == 'F' ? $this->getCancelUrl() : $this->getReturnUrl();
         $response->setRedirect($url);
     } else {
         parent::directAction($request, $response, $invokeArgs);
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:13,代码来源:netbilling-form.php


注:本文中的Am_Request::getParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。