-- cmple <[email protected]> wrote (on Friday, 24 February 2012, 01:53 PM -0800): > > That should solve your problem: > > http://zend-framework-community.634137.n4.nabble.com/View-Layer-ready-to-test-td4382619.html#a4394625 > > > Hey, Thanks for the info! > > I've tried the following: > > class Module implements AutoloaderProvider > { > .... > .... > > public function init(Manager $moduleManager) > { > $events = StaticEventManager::getInstance(); > $events->attach('bootstrap', 'bootstrap', array($this, > 'initializeView'), 100); > *$events->attach('bootstrap', 'bootstrap', array($this, > 'wireJsonStrategy'), 101);* > } > > public function wireJsonStrategy($e) > { > $app = $e->getParam('application'); > $locator = $app->getLocator(); > $view = $locator->get('Zend\View\View'); > $jsonStrategy = $locator->get('Zend\View\Strategy\JsonStrategy'); > > // Attach rendering and response strategies to view > $view->events()->attachAggregate($jsonRendererStrategy, 10); > } > } > > I get the following error: > 'Class Zend\View\View could not be located in provided definition.' > > Any ideas?
This sounds like your ZF2 checkout is not up-to-date. Zend\View\View is part of the new view layer, which was only merged a couple days ago. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
