getApplication()->getEventManager(); $moduleRouteListener = new ModuleRouteListener(); $moduleRouteListener->attach($eventManager); $e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, array(new LayoutHelpers, 'resetSession'),1000); $e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH,array(new AuthenticationService,'run'),400); $e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_RENDER, array(new LayoutHelpers, 'setLayoutTitle'),200); $e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, array(new LayoutHelpers, 'setPageNav'),80); $e->getApplication()->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, array(new LayoutHelpers, 'mobileDetect'),80); } public function init(ModuleManager $moduleManager) { $sharedEvents = $moduleManager->getEventManager()->getSharedManager(); $sharedEvents->attach(__NAMESPACE__, MvcEvent::EVENT_DISPATCH ,array(new LayoutHelpers, 'setMemberScript'), 100); } public function getConfig() { return include __DIR__ . '/config/module.config.php'; } public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), ), ); } }