News Feed
Sections




News Archive
feed this:

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

Matthew Weier O'Phinney's Blog:
Introducing the ZF2 Plugin Broker
November 12, 2010 @ 10:03:02

Matthew Weier O'Phinney has a new post to his blog today looking at a feature that'll be included in the upcoming Zend Framework 2 release - a plugin broker that changes the way plugins are loaded.

In Zend Framework 2.0, we're refactoring in a number of areas in order to increase the consistency of the framework. One area we identified early is how plugins are loaded. The word "plugins" in Zend Framework applies to a number of items: Helpers, Application resources, Filters and validators and Adapters.

In practically every case, we use a "short name" to name the plugin, in order to allow loading it dynamically. This allows more concise code, as well as the ability to configure the code in order to allow specifying alternate implementations.

The current versions of the framework use a "PluginLoader" class that handles the resolving and loading of the plugins as they're called. With this new PluginBroker, the process is optimized and split out into some namespaces for ease of use. He gets into more detail about the class resolution, instantiation, registration and touches briefly on the PluginSpecBroker, a special-case handler that's a concrete example of the LazyLoadingBroker.

0 comments voice your opinion now!
zendframework pluginbroker plugin zendframework2 broker



Community Events





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


deployment language api series symfony laravel framework package interview introduction library update zendserver community tips opinion install list podcast release

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