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


PHP Zend_Controller_Request_Http::isGet方法代码示例

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


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

示例1: listAction

 public function listAction()
 {
     $id_category = $this->getParam('category_id');
     var_dump($id_category);
     $fo = new Zend_Controller_Request_Http();
     $fo->isGet();
     // action body
 }
开发者ID:taozi3322,项目名称:jtshop,代码行数:8,代码来源:ShopController.php

示例2: canonicalizePageNumber

 /**
  * Ensures that the page that has been requested is valid based on the total
  * number of results. If it's not valid, the page is redirected to the last
  * valid page (via a response exception).
  *
  * @param integer $page
  * @param integer $perPage
  * @param integer $total
  * @param string $linkType
  * @param mixed $linkData
  */
 public function canonicalizePageNumber($page, $perPage, $total, $linkType, $linkData = null)
 {
     if ($this->getResponseType() != 'html' || !$this->_request->isGet()) {
         return;
     }
     if ($perPage < 1 || $total < 1) {
         return;
     }
     $page = max(1, $page);
     $maxPage = ceil($total / $perPage);
     if ($page <= $maxPage) {
         return;
         // within the range
     }
     $params = $_GET;
     if ($maxPage <= 1) {
         unset($params['page']);
     } else {
         $params['page'] = $maxPage;
     }
     $redirectUrl = $this->_buildLink($linkType, $linkData, $params);
     throw $this->responseException($this->responseRedirect(XenForo_ControllerResponse_Redirect::RESOURCE_CANONICAL, $redirectUrl));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:34,代码来源:Controller.php

示例3: testIsOptions

 public function testIsOptions()
 {
     $_SERVER['REQUEST_METHOD'] = 'OPTIONS';
     $this->assertTrue($this->_request->isOptions());
     $this->assertFalse($this->_request->isGet());
 }
开发者ID:nbcutech,项目名称:o3drupal,代码行数:6,代码来源:HttpTest.php

示例4: _checkSession

 /**
  * _checkSession If $_GET['reset'] is set, reset the SESSION_NAMESPACE
  *
  * @param Zend_Controller_Request_Http $req
  * @return void
  */
 private function _checkSession($req)
 {
     if ($req->isGet() && null !== ($reset = $this->_getParam('reset'))) {
         $this->session->query = null;
         $this->session->searchFormState = null;
     }
 }
开发者ID:lagged,项目名称:zf_crud,代码行数:13,代码来源:Controller.php

示例5: checkAuthorizeRequest

 /**
  * Check authorize request for validity and return token
  *
  * @return Mage_Oauth_Model_Token
  */
 public function checkAuthorizeRequest()
 {
     if (!$this->_request->isGet()) {
         Mage::throwException('Request is not GET');
     }
     $this->_requestType = self::REQUEST_AUTHORIZE;
     $this->_fetchProtocolParamsFromQuery();
     $this->_initToken();
     return $this->_token;
 }
开发者ID:,项目名称:,代码行数:15,代码来源:

示例6: _getStyleLanguageChangerParams

 protected function _getStyleLanguageChangerParams(Zend_Controller_Request_Http $request)
 {
     $params = array();
     $canChangeStyleLanguage = $request->isGet() && empty($this->_viewStateChanges['styleId']);
     if ($request->isGet()) {
         if (!empty($this->_viewStateChanges['styleId'])) {
             $params['canChangeStyle'] = false;
         } else {
             $styles = XenForo_Application::isRegistered('styles') ? XenForo_Application::get('styles') : array();
             if (count($styles) <= 1) {
                 $params['canChangeStyle'] = false;
             } else {
                 if (XenForo_Visitor::hasInstance() && XenForo_Visitor::getInstance()->is_admin) {
                     $params['canChangeStyle'] = count($styles) > 1;
                 } else {
                     $changable = 0;
                     $params['canChangeStyle'] = false;
                     foreach ($styles as $style) {
                         if ($style['user_selectable']) {
                             $changable++;
                             if ($changable > 1) {
                                 $params['canChangeStyle'] = true;
                                 break;
                             }
                         }
                     }
                 }
             }
         }
         $languages = XenForo_Application::isRegistered('languages') ? XenForo_Application::get('languages') : array();
         $params['canChangeLanguage'] = count($languages) > 1;
     } else {
         $params['canChangeStyle'] = false;
         $params['canChangeLanguage'] = false;
     }
     return $params;
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:37,代码来源:Public.php

示例7: _getLanguageChangerParams

 protected function _getLanguageChangerParams(Zend_Controller_Request_Http $request)
 {
     $params = array();
     if ($request->isGet()) {
         $languages = XenForo_Application::isRegistered('languages') ? XenForo_Application::get('languages') : array();
         $params['canChangeLanguage'] = count($languages) > 1;
     } else {
         $params['canChangeLanguage'] = false;
     }
     return $params;
 }
开发者ID:darkearl,项目名称:projectT122015,代码行数:11,代码来源:Admin.php


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