News Feed
Sections




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

Kevin Schroeder's Blog:
A little more advanced ZF2 EventManager usage
April 24, 2012 @ 08:54:55

Kevin Schroeder has a new post to his his blog with a bit more advanced example of using the Zend Framework 2 EventManager to make global event triggers.

If you look at my previous post on the ZF2 EventManager class you might be tempted to think that you are limited only to listening to events for local instances of the event manager. But no, my friend, you would be wrong. The event manager actually provides access to a sort of global event manager. But it's more than that. This global event manager allows you to listen in on events for various targets.

He includes an example of how to use the EventManager in a specific namespace that's triggered based on a custom event. He attaches a custom class, "cls2", to a listener on his "ns1/cls1" class.

0 comments voice your opinion now!
zendframework2 eventmanager example tutorial global


blog comments powered by Disqus

Similar Posts

Padraic Brady's Blog: Example Zend Framework Blog Application Tutorial: Parts 1-8 Revisited

Till Klampaeckel's Blog: Yahoo: oauth_problem=consumer_key_rejected

PHPit.net: Taking a first look at the AutoCRUD for PHP library

Script-Tutorials.com: Watermark processing on images using PHP and GD

SitePoint PHP Blog: Building a Live-score Widget Using PHP Web Sockets


Community Events

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


podcast wordpress laravel5 laravel interview unittest opinion feature framework release introduction voicesoftheelephpant api language series development library threedevsandamaybe community extension

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