Inject filter into Zend_View

Posted by chelmertz on Stack Overflow See other posts from Stack Overflow or by chelmertz
Published on 2010-04-19T13:25:51Z Indexed on 2010/04/19 14:13 UTC
Read the original article Hit count: 263

Hi!

I wish to set some properties in MyFilter with constructor injection but it seems impossible with Zend_View::addFilter(string $filter_class_name) since it loads a new instance upon usage. MyFilter implements Zend_Filter_Interface.

Can I somehow inject an instance of a filter to an instance of Zend_View?

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about zend-view