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


PHP Mage_Core_Controller_Request_Http::initForward方法代码示例

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


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

示例1: initForward

 /**
  * Initializes forward data
  *
  * @see Mage_Core_Controller_Request_Http::initForward()
  */
 public function initForward()
 {
     if (empty($this->_beforeForwardInfo)) {
         parent::initForward();
         $this->_beforeForwardInfo['route_name'] = $this->getRouteName();
         return $this;
     }
     return parent::initForward();
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:14,代码来源:Http.php

示例2: testInitForward

 public function testInitForward()
 {
     $this->_model->setParam('test', 'test');
     $this->_model->initForward();
     $this->assertEquals(array('test' => 'test'), $this->_model->getBeforeForwardInfo('params'));
     $this->_model->setParam('test', 'test1');
     /* the call shouldn't override existing info*/
     $this->_model->initForward();
     $this->assertEquals(array('test' => 'test'), $this->_model->getBeforeForwardInfo('params'));
 }
开发者ID:NatashaOlut,项目名称:Mage_Test,代码行数:10,代码来源:RequestHttp.php

示例3: _forward

 /**
  * Forward current request
  *
  * @param string $action
  * @param string $module
  * @param string $controller
  * @return void
  */
 protected function _forward($action = 'denied', $module = null, $controller = null)
 {
     if ($this->_request->getActionName() === $action && (null === $module || $this->_request->getModuleName() === $module) && (null === $controller || $this->_request->getControllerName() === $controller)) {
         return;
     }
     $this->_request->initForward();
     if ($module) {
         $this->_request->setModuleName($module);
     }
     if ($controller) {
         $this->_request->setControllerName($controller);
     }
     $this->_request->setActionName($action)->setDispatched(false);
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:22,代码来源:Observer.php

示例4: _forward

 /**
  * Forward current request
  *
  * @param string $action
  * @param string $module
  * @param string $controller
  */
 protected function _forward($action = 'denied', $module = null, $controller = null)
 {
     $actionName = strtolower($this->_request->getActionName());
     // avoid cycling
     if ($actionName === $action && (null === $module || $this->_request->getModuleName() === $module) && (null === $controller || $this->_request->getControllerName() === $controller)) {
         return;
     }
     $this->_request->initForward();
     if ($module) {
         $this->_request->setModuleName($module);
     }
     if ($controller) {
         $this->_request->setControllerName($controller);
     }
     $this->_request->setActionName($action)->setDispatched(false);
     $this->_isForwarded = true;
 }
开发者ID:beejhuff,项目名称:magento-1.13.0.2,代码行数:24,代码来源:Controllers.php

示例5: testGetSecretKeyForwarded

 /**
  * @magentoConfigFixture global/helpers/core/encryption_model Mage_Core_Model_Encryption
  * @magentoAppIsolation enabled
  */
 public function testGetSecretKeyForwarded()
 {
     $request = new Mage_Core_Controller_Request_Http();
     $request->setControllerName('controller')->setActionName('action');
     $request->initForward()->setControllerName(uniqid())->setActionName(uniqid());
     $this->_model->setRequest($request);
     Mage::getSingleton('Mage_Core_Model_Session')->setData('_form_key', 'salt');
     $this->assertEquals('c36d05473b54f437889608cbe8d50339', $this->_model->getSecretKey());
 }
开发者ID:nemphys,项目名称:magento2,代码行数:13,代码来源:UrlTest.php


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