If you were to _forward()
a request to another controller/action, you would access the params you passed by calling $this->getRequest()->getParam('param');
from the controller action that was the handler for the forward.
Example:
// in IndexController testAction
$myarray = array(
'param1' => 'value1',
'param2' => 'value2'
);
$this->_forward('forward-test', 'Test', null, $myarray);
// In TestController forwardTestAction
$value1 = $this->getRequest()->getParam('param1', '');
$value2 = $this->getRequest()->getParam('param2', '');
If $Myarray
is not an array with key-value pairs or you want to access it from a single parameter, you would want to set the 4th parameter of _forward()
to something like array('myarrayparam' => $Myarray)
and then receive it with $this->getRequest()->getParam('myarrayparam', array());