本文整理汇总了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();
}
示例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'));
}
示例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);
}
示例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;
}
示例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());
}