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


PHP Mage_Core_Controller_Request_Http::getPathInfo方法代码示例

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


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

示例1: testRewritePathInfoStoreCodeInUrl

 /**
  * @covers Mage_Core_Controller_Request_Http::rewritePathInfo
  * @covers Mage_Core_Controller_Request_Http::getOriginalPathInfo
  * @magentoConfigFixture current_store web/url/use_store 1
  */
 public function testRewritePathInfoStoreCodeInUrl()
 {
     $pathInfo = $this->_model->getPathInfo();
     $this->_model->rewritePathInfo('test/path');
     $this->assertNotEquals($pathInfo, $this->_model->getPathInfo());
     $this->assertEquals('test/path', $this->_model->getPathInfo());
     $this->assertEquals($pathInfo, $this->_model->getOriginalPathInfo());
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:13,代码来源:RequestHttp.php

示例2: match

 /**
  * Validate and Match Cms Page and modify request
  *
  * @param Mage_Core_Controller_Request_Http $request
  * @return bool
  *
  * @SuppressWarnings(PHPMD.ExitExpression)
  */
 public function match(Mage_Core_Controller_Request_Http $request)
 {
     if (!Mage::isInstalled()) {
         Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('install'))->sendResponse();
         exit;
     }
     $identifier = trim($request->getPathInfo(), '/');
     $condition = new Varien_Object(array('identifier' => $identifier, 'continue' => true));
     $this->_eventManager->dispatch('cms_controller_router_match_before', array('router' => $this, 'condition' => $condition));
     $identifier = $condition->getIdentifier();
     if ($condition->getRedirectUrl()) {
         Mage::app()->getFrontController()->getResponse()->setRedirect($condition->getRedirectUrl())->sendResponse();
         $request->setDispatched(true);
         return $this->_controllerFactory->createController('Mage_Core_Controller_Varien_Action_Redirect', array('request' => $request));
     }
     if (!$condition->getContinue()) {
         return null;
     }
     $page = Mage::getModel('Mage_Cms_Model_Page');
     $pageId = $page->checkIdentifier($identifier, Mage::app()->getStore()->getId());
     if (!$pageId) {
         return null;
     }
     $request->setModuleName('cms')->setControllerName('page')->setActionName('view')->setParam('page_id', $pageId);
     $request->setAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS, $identifier);
     return $this->_controllerFactory->createController('Mage_Core_Controller_Varien_Action_Forward', array('request' => $request));
 }
开发者ID:natxetee,项目名称:magento2,代码行数:35,代码来源:Router.php

示例3: getCurrentUnSecureUrl

 /**
  * 
  * @param Mage_Core_Controller_Request_Http $request
  * @return string
  */
 public function getCurrentUnSecureUrl($request)
 {
     if ($alias = $request->getAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS)) {
         return Mage::getBaseUrl('link', false) . ltrim($alias, '/');
     }
     return Mage::getBaseUrl('link', false) . ltrim($request->getPathInfo(), '/');
 }
开发者ID:steffen-wirth,项目名称:Loewenstark_Seo,代码行数:12,代码来源:Secure.php

示例4: _getCurrentSecureUrl

 /**
  * Retrieve current secure url
  *
  * @param Mage_Core_Controller_Request_Http $request
  * @return string
  */
 protected function _getCurrentSecureUrl($request)
 {
     return Mage::app()->getStore(Mage_Core_Model_App::ADMIN_STORE_ID)->getBaseUrl('link', true) . ltrim($request->getPathInfo(), '/');
 }
开发者ID:lightyoruichi,项目名称:Magento-Pre-Patched-Files,代码行数:10,代码来源:Admin.php

示例5: update

 /**
  * Update system data for current VDE environment
  *
  * @param string $areaCode
  * @param Mage_Core_Controller_Request_Http $request
  * @param Mage_Core_Controller_Varien_ActionAbstract $controller
  */
 public function update($areaCode, Mage_Core_Controller_Request_Http $request, Mage_Core_Controller_Varien_ActionAbstract $controller)
 {
     $handle = $request->getParam('handle', '');
     if (empty($handle)) {
         $mode = self::MODE_NAVIGATION;
         if (!$request->isAjax()) {
             $this->_backendSession->setData(self::CURRENT_HANDLE_SESSION_KEY, $controller->getFullActionName());
             $this->_backendSession->setData(self::CURRENT_URL_SESSION_KEY, $request->getPathInfo());
         }
     } else {
         $mode = self::MODE_DESIGN;
     }
     $this->_backendSession->setData(self::CURRENT_MODE_SESSION_KEY, $mode);
     $this->_injectUrlModel($mode);
     $this->_injectLayout($mode, $areaCode);
     $this->_injectLayoutUpdateResourceModel();
     $this->_setTheme();
     $this->_disableCache();
 }
开发者ID:,项目名称:,代码行数:26,代码来源:

示例6: _prepareVdeRequest

 /**
  * Modify request path to imitate basic request
  *
  * @param Mage_Core_Controller_Request_Http $request
  * @return Mage_DesignEditor_Controller_Varien_Router_Standard
  */
 protected function _prepareVdeRequest(Mage_Core_Controller_Request_Http $request)
 {
     $vdeFrontName = $this->_helper->getFrontName();
     $noVdePath = substr($request->getPathInfo(), strlen($vdeFrontName) + 1) ?: '/';
     $request->setPathInfo($noVdePath);
     return $this;
 }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例7: _parseRequest

 /**
  * Parse request URL params
  *
  * @param Mage_Core_Controller_Request_Http $request
  * @return array
  */
 protected function _parseRequest(Mage_Core_Controller_Request_Http $request)
 {
     $output = array();
     $path = trim($request->getPathInfo(), '/');
     $params = explode('/', $path ? $path : $this->_getDefaultPath());
     foreach ($this->_requiredParams as $paramName) {
         $output[$paramName] = array_shift($params);
     }
     for ($i = 0, $l = sizeof($params); $i < $l; $i += 2) {
         $output['variables'][$params[$i]] = isset($params[$i + 1]) ? urldecode($params[$i + 1]) : '';
     }
     return $output;
 }
开发者ID:,项目名称:,代码行数:19,代码来源:


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