Extending Controllers

Spotsec has posted about Extending Zend_Controller_Action and keeping init() and everyone should read it!

Essentially he is saying that when you extend Zend_Controller_Action, you should put your initialisation code into the constructor rather than init(). The tricky bit is that Zend_Controller_Action’s constructor takes two parameters which people seem to forget about. If you don’t include them, then everything breaks.

We do this at work (and we use control+click to find the function signature, not google!)

Posted by Rob on 13th January 2008 under Around the web |

Comments RSS

Leave a Reply