HHGAG wrote
> 
> 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?

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-contextSwitch-to-json-tp4418147p4418725.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to