-- HHGAG <[email protected]> wrote (on Sunday, 20 May 2012, 12:29 AM -0700): > <snip> > public function init(ModuleManager $moduleManager) > { > $events = $moduleManager->events(); > $sharedEvents = $events->getSharedManager(); > $sharedEvents->attach('application', 'bootstrap', array($this, > 'initializeSmarty') , 10010); > > $serviceManager = > $moduleManager->getEvent()->getParam('ServiceManager'); > $sharedEvents->detach('application', > $serviceManager->get('ViewManager')); > </snip> > > causes: > > Catchable fatal error: Argument 2 passed to > Zend\EventManager\SharedEventManager::detach() must be an instance of > Zend\Stdlib\CallbackHandler, instance of Zend\Mvc\View\ViewManager given
Right -- because you're retrieving an instance of Zend\Mvc\View\ViewManager, which is a ListenerAggregate, and the SharedEventManager is incapable of either attaching or detaching aggregates I'm trying to figure out what you're trying to do here, actually. Are you: * Trying to remove all view integration? * Trying to remove the default view rendering strategy? * Something else? Basically, it's not a bug -- you're simply doing something you're not supposed to. If you can answer the questions above, I may be able to give you some code to accomplish what you want. -- 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]
