86d9d4e2f47afd28d25ae691d550b01af63cee39
[zf2.biz/application_blanche.git] / module / Application / Module.php
1 <?php
2 /**
3  * Zend Framework (http://framework.zend.com/)
4  *
5  * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
6  * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
7  * @license   http://framework.zend.com/license/new-bsd New BSD License
8  */
9
10 namespace Application;
11
12 use Zend\Mvc\ModuleRouteListener;
13
14 class Module
15 {
16     public function onBootstrap($e)
17     {
18         $e->getApplication()->getServiceManager()->get('translator');
19         $eventManager        = $e->getApplication()->getEventManager();
20         $moduleRouteListener = new ModuleRouteListener();
21         $moduleRouteListener->attach($eventManager);
22     }
23
24     public function getConfig()
25     {
26         return include __DIR__ . '/config/module.config.php';
27     }
28
29     public function getAutoloaderConfig()
30     {
31         return array(
32             'Zend\Loader\StandardAutoloader' => array(
33                 'namespaces' => array(
34                     __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
35                 ),
36             ),
37         );
38     }
39 }