-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Create factories for selected view collaborators #4251
Create factories for selected view collaborators #4251
Conversation
Failure is due to inability of Composer to lookup ocramius/proxy-manager. Marco's looking into that. Regardless, a work in progress... |
- Created `HttpViewManagerFactory` and `ConsoleViewManagerFactory`; each will return the requested view manager. - `ViewManagerFactory` now consumes the above two factories (instead of using direct instantiation). This will allow console endpoints to utilize the HTTP view manager if desired by doing the following: ```php 'service_manager' => array( 'factories' => array( 'ViewManager' => 'Zend\Mvc\Service\HttpViewManager', ), ), ``` I plan further refactoring to move the event listener registration into individual factories as well.
@weierophinney looks like this breaks current tests: There were 3 errors:
/Users/mwillbanks/Projects/zf2_ZF/library/Zend/ServiceManager/ServiceManager.php:496
/Users/mwillbanks/Projects/zf2_ZF/library/Zend/ServiceManager/ServiceManager.php:496
/Users/mwillbanks/Projects/zf2_ZF/library/Zend/ServiceManager/ServiceManager.php:496 |
- Ensure both HttpViewManager and ConsoleViewManager factories are present
- Ensure both HttpViewManager and ConsoleViewManager factories are present
Currently, I've made independent factories for HTTP and Console ViewManagers:
HttpViewManagerFactory
andConsoleViewManagerFactory
; eachwill return the requested view manager.
ViewManagerFactory
now consumes the above two factories (instead ofusing direct instantiation).
This will allow console endpoints to utilize the HTTP view manager if
desired by doing the following: