Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

returning a value using zend forward

i have a function in another controller which i want to access 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 a site is this:

but

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

thanks

like image 600
dean jase Avatar asked Jan 23 '26 14:01

dean jase


1 Answers

_forward() doesn't return any value, so you cannot do it like this. Maybe you could consider using Zend_Registry for storing $myvbale.

like image 144
Marcin Avatar answered Jan 26 '26 23:01

Marcin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!