Module   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 45
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getDependencies() 0 4 1
A getConfig() 0 13 1
A onConsole() 0 4 1
A onHttp() 0 4 1
A homeAction() 0 4 1
A exampleAction() 0 4 1
1
<?php
2
3
namespace ExampleModule;
4
5
use Webino\Application;
6
use Webino\Config\Feature\Route;
7
use Webino\Module\AbstractModule;
8
use Webino\Module\Config;
9
// TODO events
10
use Zend\EventManager\Event;
11
use Zend\EventManager\Event as ConfigEvent;
12
use Zend\EventManager\Event as DispatchEvent;
13
14
/**
15
 * Class Module
16
 */
17
class Module extends AbstractModule
18
{
19
    // TODO interface
20
    public function getDependencies()
21
    {
22
        return ['ExampleModule02'];
23
    }
24
25
    // TODO interface
26
    public function getConfig(ConfigEvent $event)
27
    {
28
        return new Config([
29
30
            'example_module' => [
31
                'test_key' => ['example_value'],
32
            ],
33
34
            new Route('/listener-test', 'ExampleModule\Listener\ExampleListener'),
35
36
            new Route('/config', [$this, 'homeAction']),
37
        ]);
38
    }
39
40
    // TODO interface
41
    public function onConsole(Event $event)
42
    {
43
        // console initializer
44
    }
45
46
    // TODO interface
47
    public function onHttp(Event $event)
48
    {
49
        // http initializer
50
    }
51
52
    public function homeAction(Event $event)
53
    {
54
        return 'TEST HOME X';
55
    }
56
57
    public function exampleAction(Event $event)
58
    {
59
        return 'TEST EXAMPLE';
60
    }
61
}
62