News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Simon Jones' Blog:
Understanding the stack index for Zend Framework Controller plugins
July 21, 2010 @ 14:58:49

New on his blog today, Simon Jones has posted a handy guide for those using the Zend Framework out there to the stack index for plugins the framework uses.

Zend Framework Controller plugins are a powerful way to inject logic into your controller system at various points, such as before and after an action dispatch. Plugins are run in the order they are added, though it is possible to change the order by defining a custom stack index. ZF internal plugins such as Zend_Controller_Plugin_ErrorHandler, which displays a nice Error 404 page, has a stack index of 999 to ensure it runs at the end of any plugin cycle. However, it's not so obvious from the ZF manual how to set a custom stack index.

He shows how to use the second parameter of registering a plugin to define the stack level and how to get the listing of the current stack to see just where yours might need to be placed. He also includes code samples and an output example of the default Zend Framework stack.

0 comments voice your opinion now!
zendframework controller plugin stack order


blog comments powered by Disqus

Similar Posts

Aleksey Zapparov's Blog: How to handle unexistence controllers/actions with Zend_Controller

Zend Developer Zone: Zend Framework 1.6 Now Available

PHPBuilder.com: Customize Your WordPress Blog with PHP Plugins and Widgets

Pádraic Brady's Blog: Complex Views with the Zend Framework - Pt 5: The Two-Step View Pattern

Andi Gutmans' Blog: Zend_Amf Update...


Community Events

Don't see your event here?
Let us know!


voicesoftheelephpant laravel language library security version introduction opinion extension laravel5 php7 community podcast series framework api list release interview example

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework