Matthew Turland’s Blog: The Configuration Pattern in Zend Framework

Zend Framework is constantly changing. One of ongoing changes is unification of constructors that accept an array or Zend_Config object of options that relate to the defined setters is a current guideline.

We decided on this for several reasons. One, as you note, is predictability; if all constructors act in the same way, it’s really easy to know what you should pass. Another is to prepare the framework for dependency injection; having a common constructor paradigm such as this makes it easy to use DI containers with the components.

Knowing direction some blogers decided to spread the word about the concept. Matthew Turland wrote a post explaing how options relate to setter and getters and how a class should implement the concept. Small thing but good to know, especially for all contributors.