File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Zend Framework (http://framework.zend.com/)
4+ *
5+ * @link https://github.com/kuzmar/ZF2-Facebook-SKD-Module for the canonical source repository
6+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
7+ * @license http://framework.zend.com/license/new-bsd New BSD License
8+ */
9+
10+ namespace Facebook ;
11+
12+ use Zend \ModuleManager \Feature \AutoloaderProviderInterface ;
13+ use Zend \Mvc \ModuleRouteListener ;
14+
15+ class Module implements AutoloaderProviderInterface
16+ {
17+ public function getAutoloaderConfig ()
18+ {
19+ return array (
20+ 'Zend\Loader\ClassMapAutoloader ' => array (
21+ __DIR__ . '/autoload_classmap.php ' ,
22+ ),
23+ 'Zend\Loader\StandardAutoloader ' => array (
24+ 'namespaces ' => array (
25+ // if we're in a namespace deeper than one level we need to fix the \ in the path
26+ __NAMESPACE__ => __DIR__ . '/src/ ' . str_replace ('\\' , '/ ' , __NAMESPACE__ ),
27+ ),
28+ ),
29+ );
30+ }
31+
32+ public function getConfig ()
33+ {
34+ return include __DIR__ . '/config/module.config.php ' ;
35+ }
36+
37+ public function onBootstrap ($ e )
38+ {
39+ // You may not need to do this if you're doing it elsewhere in your
40+ // application
41+ $ eventManager = $ e ->getApplication ()->getEventManager ();
42+ $ moduleRouteListener = new ModuleRouteListener ();
43+ $ moduleRouteListener ->attach ($ eventManager );
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments