X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FApplication%2FModule.php;h=86d9d4e2f47afd28d25ae691d550b01af63cee39;hb=3d8c513862853e1ebea7158cda8bd45040091613;hp=5f9342686cc52d54e6f3cbb85ca4faaea28782e2;hpb=7889d92c1550c6122119815ad673d186fee4f415;p=zf2.biz%2Fapplication_blanche.git diff --git a/module/Application/Module.php b/module/Application/Module.php index 5f93426..86d9d4e 100644 --- a/module/Application/Module.php +++ b/module/Application/Module.php @@ -1,26 +1,34 @@ events(); - $sharedEvents = $events->getSharedManager(); - $sharedEvents->attach('bootstrap', 'bootstrap', array($this, 'initializeView'), 100); + $e->getApplication()->getServiceManager()->get('translator'); + $eventManager = $e->getApplication()->getEventManager(); + $moduleRouteListener = new ModuleRouteListener(); + $moduleRouteListener->attach($eventManager); + } + + public function getConfig() + { + return include __DIR__ . '/config/module.config.php'; } public function getAutoloaderConfig() { return array( - 'Zend\Loader\ClassMapAutoloader' => array( - __DIR__ . '/autoload_classmap.php', - ), 'Zend\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, @@ -28,18 +36,4 @@ class Module implements AutoloaderProvider ), ); } - - public function getConfig() - { - return include __DIR__ . '/config/module.config.php'; - } - - public function initializeView($e) - { - $app = $e->getParam('application'); - $basePath = $app->getRequest()->getBasePath(); - $locator = $app->getLocator(); - $renderer = $locator->get('Zend\View\Renderer\PhpRenderer'); - $renderer->plugin('basePath')->setBasePath($basePath); - } }