當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。