Конечно. Это пример кода из документации Action Helpers (см. Раздел Redirector
, примерно на 2/3 пути вниз по странице.) Возможно, вам понадобится получить ссылку на помощника перенаправителя и вызвать его. из goto*
методов, которые выполняет этот код.
class ForwardController extends Zend_Controller_Action
{
/**
* Redirector - defined for code completion
*
* @var Zend_Controller_Action_Helper_Redirector
*/
protected $_redirector = null;
public function init()
{
$this->_redirector = $this->_helper->getHelper('Redirector');
}
public function myAction()
{
/* do some stuff */
// Redirect to 'my-action' of 'my-controller' in the current
// module, using the params param1 => test and param2 => test2
$this->_redirector->gotoSimple('my-action',
'my-controller',
null,
array('param1' => 'test', 'param2' => 'test2'));
}
}