xing93111 wrote:
> 
> Thanks chinaski.  One more question is: once I set a class variable value
> in init() method, can I change the value in a method such as indexAction()
> and use it in another method such as listAction()? For example:
> 
> ...
> 
> Thanks
> 
> 

This will only work if in indexAction() you call the listAction() method,
i.e.

function indexAction() 
{
//stuff
$this->_forumid = $newval;
$list = $this->listAction();
}

Otherwise listAction() will be called as a result of a new request, and all
vars get reinitialised.

Chinaski


-- 
View this message in context: 
http://www.nabble.com/Can-controller-class-have-class-variables--tp16723533p16731776.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to