Module::getAutoloaderConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
ccs 5
cts 5
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Columnis;
4
5
use Zend\Mvc\ModuleRouteListener;
6
use Zend\Mvc\MvcEvent;
7
use Zend\Uri\UriFactory;
8
9
class Module {
10
11 1
    public function onBootstrap(MvcEvent $e) {
12 1
        UriFactory::registerScheme('chrome-extension', 'Zend\Uri\Uri');
13
14 1
        $eventManager = $e->getApplication()->getEventManager();
15 1
        $moduleRouteListener = new ModuleRouteListener();
16 1
        $moduleRouteListener->attach($eventManager);
17
18
        // get the cache listener service
19 1
        $cacheListener = $e->getApplication()->getServiceManager()->get('Columnis\Model\CacheListener');
20
21
        // attach the listeners to the event manager
22 1
        $e->getApplication()->getEventManager()->attach($cacheListener);
23 1
    }
24
25 1
    public function getConfig() {
26 1
        return include __DIR__.'/config/module.config.php';
27
    }
28
29 1
    public function getAutoloaderConfig() {
30
        return array(
31
            'Zend\Loader\StandardAutoloader' => array(
32
                'namespaces' => array(
33 1
                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
34 1
                ),
35 1
            ),
36 1
        );
37
    }
38
}
39