Module::homeAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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