zendframework/zf2 — pull request #2820 by bakura10 (2012-10-22 11:21:52+00:00)
Title: [WIP] Form plugin manager

This PR tries to unify everything and bring plugin manager to Form elements, so that user can specify the name instead of the FCQN, and also to handle dependencies through the SM.

It's not working yet because I need your advice. As you can see, I've modified the factory code so that it uses the plugin manager (and fallback to directly instantiate the element as before if it does not exist in the plugin manager).

However, the problem is that the factory is created in the Form element, but as it does not have access to the service manager, I can't transfer the plugin manager from form to factory. Of course, we can't ask people to create a Form object using the SM.

Furthermore, I introduced back the init function. This is the only way I've found so that adding elements once dependencies are set can be possible. @weierophinney, any thoughts on that ?