X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FApplication%2FModule.php;h=a31d2536eca4abf63e6f94ff9fb040a0d3e28194;hb=7ac195f6bdd98a9d64c58bfc79fd885c2f489c88;hp=d85f6cfbdce8d961684d34e00fe3b2dc7015ae4e;hpb=31401ee59c030a46693cfde20323abd4066f9928;p=zf2.biz%2Fgalerie.git diff --git a/module/Application/Module.php b/module/Application/Module.php index d85f6cf..a31d253 100644 --- a/module/Application/Module.php +++ b/module/Application/Module.php @@ -2,24 +2,16 @@ namespace Application; -use Zend\Module\Manager, - Zend\EventManager\StaticEventManager, - Zend\Module\Consumer\AutoloaderProvider; - -class Module implements AutoloaderProvider +class Module { - public function init(Manager $moduleManager) + public function getConfig() { - $events = StaticEventManager::getInstance(); - $events->attach('bootstrap', 'bootstrap', array($this, 'initializeView'), 100); + 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__, @@ -27,18 +19,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); - } }