AbstractApplication   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 10

Importance

Changes 0
Metric Value
dl 0
loc 58
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBootstrap() 0 4 1
A setBootstrap() 0 4 1
1
<?php
2
/**
3
 * Webino™ (http://webino.sk)
4
 *
5
 * @link        https://github.com/webino for the canonical source repository
6
 * @copyright   Copyright (c) 2015-2017 Webino, s.r.o. (http://webino.sk)
7
 * @author      Peter Bačinský <[email protected]>
8
 * @license     BSD-3-Clause
9
 */
10
11
namespace WebinoAppLib\Application;
12
13
use WebinoAppLib\Contract;
14
use WebinoAppLib\Service\Bootstrap;
15
use Zend\ServiceManager\ServiceManager;
16
17
/**
18
 * Class AbstractApplication
19
 */
20
abstract class AbstractApplication implements
21
    AbstractApplicationInterface,
22
    Contract\ConsoleInterface,
23
    Contract\DebuggerInterface,
24
    Contract\ServicesInterface,
25
    Contract\ConfigInterface,
26
    Contract\EventsInterface,
27
    Contract\LoggerInterface,
28
    Contract\CacheInterface,
29
    Contract\FilesInterface,
30
    Contract\RouterInterface,
31
    Contract\MailerInterface
32
{
33
    use Traits\ConsoleTrait;
34
    use Traits\DebuggerTrait;
35
    use Traits\ServicesTrait;
36
    use Traits\ConfigTrait;
37
    use Traits\EventsTrait;
38
    use Traits\LoggerTrait;
39
    use Traits\CacheTrait;
40
    use Traits\FilesTrait;
41
    use Traits\RouterTrait;
42
    use Traits\MailerTrait;
43
44
    /**
45
     * Application bootstrap service name
46
     */
47
    const BOOTSTRAP = 'Bootstrap';
48
49
    /**
50
     * @var Bootstrap
51
     */
52
    private $bootstrap;
53
54
    /**
55
     * @param ServiceManager $services
56
     */
57
    public function __construct(ServiceManager $services)
58
    {
59
        $this->services = $services;
60
    }
61
62
    /**
63
     * @return Bootstrap
64
     */
65
    protected function getBootstrap()
66
    {
67
        return $this->bootstrap;
68
    }
69
70
    /**
71
     * @param Bootstrap $bootstrap
72
     */
73
    protected function setBootstrap(Bootstrap $bootstrap)
74
    {
75
        $this->bootstrap = $bootstrap;
76
    }
77
}
78