Matthew Weier O’Phinney’s Blog: Creating Re-Usable Zend_Application Resource Plugins
In follow up to his post introducing Zend_Application component Matthew talks about writing custom and reusable component resources.
In my last article, I wrote about how to get started with Zend_Application, including some information about how to write resource methods, as well as listing available resource plugins. What happens when you need a re-usable resource for which there is no existing plugin shipped? Why, write your own, of course! All plugins in Zend Framework follow a common pattern. Basically, you group plugins under a common directory, with a common class prefix, and then notify the pluggable class of their location.
In his step-by-step guide he shows how create resource class following framework’s naming and coding conventions, make use of dependency tracking and make resource configurable using standard configuration files and bootstrapping mechanism.