Register ModuleRouteListener
[zf2.biz/galerie.git] / module / Application / Module.php
1 <?php
2
3 namespace Application;
4
5 use Zend\Mvc\ModuleRouteListener;
6
7 class Module
8 {
9     public function onBootstrap($e)
10     {
11         $eventManager        = $e->getApplication()->getEventManager();
12         $moduleRouteListener = new ModuleRouteListener();
13         $moduleRouteListener->attach($eventManager);
14     }
15
16     public function getConfig()
17     {
18         return include __DIR__ . '/config/module.config.php';
19     }
20
21     public function getAutoloaderConfig()
22     {
23         return array(
24             'Zend\Loader\StandardAutoloader' => array(
25                 'namespaces' => array(
26                     __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
27                 ),
28             ),
29         );
30     }
31 }