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


PHP Mage_Core_Controller_Request_Http::getQuery方法代码示例

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


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

示例1: getSearchQuery

 /**
  * @param Mage_Core_Controller_Request_Http $request
  *
  * @return string $query
  */
 private function getSearchQuery(Mage_Core_Controller_Request_Http $request)
 {
     $maxQueryLength = (int) Mage::getStoreConfig('catalog/search/max_query_length') > 0 ? (int) Mage::getStoreConfig('catalog/search/max_query_length') : 128;
     $query = preg_replace('/(\\W|html|php)+/', ' ', $request->getRequestString());
     if (count($request->getQuery()) > 0) {
         $query .= implode(' ', $request->getQuery());
     }
     return substr($query, 0, $maxQueryLength);
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:14,代码来源:Route.php

示例2: getQueryParams

 /**
  * @return array
  */
 public function getQueryParams()
 {
     if (is_null($this->_queryParams)) {
         $query = $this->_request->getQuery();
         foreach ($this->_clearParams as $param) {
             if (array_key_exists($param, $query)) {
                 unset($query[$param]);
             }
         }
         foreach ($this->getFilterableAttributes() as $attribute) {
             if (isset($query[$attribute->getAttributeCode()])) {
                 unset($query[$attribute->getAttributeCode()]);
             }
         }
         $this->_queryParams = $query;
     }
     return $this->_queryParams;
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:21,代码来源:Request.php

示例3: __construct

 /**
  * Constructor
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_categoryResource = isset($args['resource']) ? $args['resource'] : Mage::getResourceSingleton('enterprise_catalog/category');
     $this->_request = !empty($args['request']) ? $args['request'] : Mage::app()->getFrontController()->getRequest();
     $this->_response = !empty($args['response']) ? $args['response'] : Mage::app()->getFrontController()->getResponse();
     $this->_storeId = isset($args['storeId']) ? $args['storeId'] : Mage::app()->getStore()->getId();
     $fromStore = $this->_request->getQuery('___from_store');
     $this->_prevStoreId = isset($args['prevStoreId']) ? $args['prevStoreId'] : (!empty($fromStore) ? Mage::app()->getStore($fromStore)->getId() : $this->_storeId);
     $this->_config = isset($args['config']) ? $args['config'] : Mage::app()->getConfig();
     $this->_seoSuffix = (string) $this->_config->getNode(Mage_Catalog_Helper_Category::XML_PATH_CATEGORY_URL_SUFFIX, 'store', (int) $this->_prevStoreId);
     $this->_newStoreSeoSuffix = (string) $this->_config->getNode(Mage_Catalog_Helper_Category::XML_PATH_CATEGORY_URL_SUFFIX, 'store', (int) $this->_storeId);
     if (isset($args['baseUrl'])) {
         $this->_baseUrl = $args['baseUrl'];
     }
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:20,代码来源:Category.php

示例4: _fetchProtocolParamsFromQuery

 /**
  * Retrieve protocol parameters from query string
  *
  * @return Mage_Oauth_Model_Server
  */
 protected function _fetchProtocolParamsFromQuery()
 {
     foreach ($this->_request->getQuery() as $queryParamName => $queryParamValue) {
         if ($this->_isProtocolParameter($queryParamName)) {
             $this->_protocolParams[$queryParamName] = $queryParamValue;
         }
     }
     return $this;
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:14,代码来源:Server.php


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