X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FApplication%2FModule.php;h=7786cd84887ed5d10b0a33571b19785831c1c91f;hb=4761cdf04dc39e44c2c33919e2766076e1b797e0;hp=a540a11f8d7d3f544843c47060db1cd6520438ed;hpb=7a482c8f4e56f572888c780da6c1912facd26850;p=zf2.biz%2Fapplication_blanche.git diff --git a/module/Application/Module.php b/module/Application/Module.php index a540a11..7786cd8 100644 --- a/module/Application/Module.php +++ b/module/Application/Module.php @@ -1,26 +1,35 @@ events(); - $sharedEvents = $events->getSharedCollections(); - $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 +37,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); - } }