Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Zend Framework (http://framework.zend.com/)
- *
- * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
- * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- * @license http://framework.zend.com/license/new-bsd New BSD License
- */
- namespace Application;
- use Zend\Mvc\ModuleRouteListener;
- use Zend\Mvc\MvcEvent;
- use Doctrine\ORM\Tools\Setup;
- use Doctrine\ORM\EntityManager;
- use Doctrine\ORM\Configuration;
- use Doctrine\Common\Cache\ArrayCache as Cache;
- use Doctrine\Common\Annotations\AnnotationRegistry;
- use Doctrine\Common\ClassLoader;
- class Module
- {
- const DOCTRINE_BASE_PATH = '/../../vendor/doctrine/orm/lib/Doctrine';
- public function onBootstrap(MvcEvent $e)
- {
- $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\StandardAutoloader' => array(
- 'namespaces' => array(
- __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
- 'Doctrine\Common' => realpath(__DIR__ . self::DOCTRINE_BASE_PATH . '/Common'),
- 'Doctrine\DBAL' => realpath(__DIR__ . self::DOCTRINE_BASE_PATH . '/DBAL'),
- 'Doctrine\ORM' => realpath(__DIR__ . self::DOCTRINE_BASE_PATH . '/ORM')
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement