X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FApplication%2FModule.php;h=0ed2ef2f91e16136acc6958cc00d0e90984a4c77;hb=84c899f389e3fa38f8f23a202d3c110c7c01af6c;hp=5f9342686cc52d54e6f3cbb85ca4faaea28782e2;hpb=7889d92c1550c6122119815ad673d186fee4f415;p=zf2.biz%2Fgalerie.git diff --git a/module/Application/Module.php b/module/Application/Module.php index 5f93426..0ed2ef2 100644 --- a/module/Application/Module.php +++ b/module/Application/Module.php @@ -2,44 +2,10 @@ namespace Application; -use Zend\Module\Manager, - Zend\EventManager\StaticEventManager, - Zend\Module\Consumer\AutoloaderProvider; - -class Module implements AutoloaderProvider +class Module { - public function init(Manager $moduleManager) - { - $events = $moduleManager->events(); - $sharedEvents = $events->getSharedManager(); - $sharedEvents->attach('bootstrap', 'bootstrap', array($this, 'initializeView'), 100); - } - - public function getAutoloaderConfig() - { - return array( - 'Zend\Loader\ClassMapAutoloader' => array( - __DIR__ . '/autoload_classmap.php', - ), - 'Zend\Loader\StandardAutoloader' => array( - 'namespaces' => array( - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, - ), - ), - ); - } - 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); - } }