Gary Hockin has a post to his site today introducing you to the new ConfigAbstractFactory class to work with ZendServiceManager in Zend Framework applications. The library helps make the creation of configuration service factories easier than having to write them in code.
I wanted to introduce the new ConfigAbstractFactory that has been written for ZendServiceManager 3 and got merged to develop today and will be included in the next 3.2.0 release of the ServiceManager.[...] Laravel has shown us that developer usability is a real thing and that by making things easier for your target audience you gain traction and Good Things Happen. This is why in response to an issue on the Service Manager repository, I’ve written the catchily named Config Abstract Factory. Essentially, it allows you to create service factories from configuration rather than having to write all the code.
He talks about being a fan of the "configuration over magic" approach the Zend Framework has and how, with this new new library, it makes it even easier to directly link configuration files and the objects created based on their contents. He gives a simple example of a UserServiceFactory
, first showing the "old" way of handling it then how to shift over to the new abstract handler just defining the same setup in the module configuration.