Pass a variable from postDispatch() to view instance in Zend Framework

Posted by takeshin on Stack Overflow See other posts from Stack Overflow or by takeshin
Published on 2010-03-27T22:15:50Z Indexed on 2010/03/27 22:23 UTC
Read the original article Hit count: 133

Filed under:
|

I have a controller plugin with postDispatch() hook, and there I have a $variable.

How to pass this variable to the view instance?

I tried Zend_Layout::getMvcInstance()->getView(), but this returns new view instance (not the application resource). The same with $bootstrap->getResource('view').

I don't want to pass it as a request param.
Now, as a workaround I do it using Zend_Registry.

But, is it the best way?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework