Module::onBootstrap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
/**
4
 * Zend Framework Application (http://mateuszsitek.com/projects/zendframework-application).
5
 *
6
 * @link      http://github.com/ma-si/zendframework-application for the canonical source repository
7
 *
8
 * @copyright Copyright (c) 2006-2016 Aist Internet Technologies (http://aist.pl) All rights reserved.
9
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
10
 */
11
12
namespace Application;
13
14
use Zend\Mvc\ModuleRouteListener;
15
use Zend\Mvc\MvcEvent;
16
17
/**
18
 * Class Module.
19
 */
20
class Module
21
{
22
    /**
23
     * @param MvcEvent $e
24
     */
25
    public function onBootstrap(MvcEvent $e)
26
    {
27
        $eventManager        = $e->getApplication()->getEventManager();
28
        $moduleRouteListener = new ModuleRouteListener();
29
        $moduleRouteListener->attach($eventManager);
30
    }
31
32
    /**
33
     * @return array
34
     */
35
    public function getConfig()
36
    {
37
        return include __DIR__ . '/config/module.config.php';
38
    }
39
40
    /**
41
     * @return array
42
     */
43
    public function getAutoloaderConfig()
44
    {
45
        return [
46
            'Zend\Loader\StandardAutoloader' => [
47
                'namespaces' => [
48
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
49
                ],
50
            ],
51
        ];
52
    }
53
}
54