@@ 9-38 (lines=30) @@ | ||
6 | use Zend\ModuleManager\Feature\AutoloaderProviderInterface; |
|
7 | use Zend\ModuleManager\Feature\ConfigProviderInterface; |
|
8 | ||
9 | class Module implements ConfigProviderInterface, AutoloaderProviderInterface |
|
10 | { |
|
11 | /** |
|
12 | * Returns configuration to merge with application configuration. |
|
13 | * |
|
14 | * @return array|\Traversable |
|
15 | */ |
|
16 | public function getConfig() |
|
17 | { |
|
18 | return include __DIR__.'/config/module.config.php'; |
|
19 | } |
|
20 | ||
21 | /** |
|
22 | * Return an array for passing to Zend\Loader\AutoloaderFactory. |
|
23 | * |
|
24 | * @return array |
|
25 | */ |
|
26 | public function getAutoloaderConfig() |
|
27 | { |
|
28 | return [ |
|
29 | 'Zend\Loader\StandardAutoloader' => [ |
|
30 | StandardAutoloader::LOAD_NS => [ |
|
31 | __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
32 | ], |
|
33 | ], |
|
34 | ]; |
|
35 | } |
|
36 | } |
|
37 |
@@ 30-59 (lines=30) @@ | ||
27 | * |
|
28 | * @author Alejandro Celaya Alastrué <[email protected]> |
|
29 | */ |
|
30 | class Module implements ConfigProviderInterface, AutoloaderProviderInterface |
|
31 | { |
|
32 | /** |
|
33 | * Returns configuration to merge with application configuration. |
|
34 | * |
|
35 | * @return array|\Traversable |
|
36 | */ |
|
37 | public function getConfig() |
|
38 | { |
|
39 | return include __DIR__.'/config/module.config.php'; |
|
40 | } |
|
41 | ||
42 | /** |
|
43 | * Return an array for passing to Zend\Loader\AutoloaderFactory. |
|
44 | * |
|
45 | * @return array |
|
46 | */ |
|
47 | public function getAutoloaderConfig() |
|
48 | { |
|
49 | return [ |
|
50 | 'Zend\Loader\StandardAutoloader' => [ |
|
51 | StandardAutoloader::LOAD_NS => [ |
|
52 | __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
53 | ], |
|
54 | ], |
|
55 | ]; |
|
56 | } |
|
57 | } |
|
58 |