Return value with zend forward

I have a function in another controller that I want to get using the zend forward function,

public function creanAction(){

$myvbale=22;

return $myvbale *2;

}

in my other controller, I have this:

public function localForwardAction
{
   this->view->message=$this->_forward("crean","account");
}

Example from the site:

but

I want the var message to contain the return value or result from the controller / action specified in the forward function ...

thank

+3
source share
1 answer

_forward()returns no value, so you cannot do it like this. Perhaps you can use Zend_Registry for storage $myvbale.

+1
source

All Articles