KernelServiceLocator   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 47
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getExtension() 0 4 1
A getResource() 0 4 1
A getConfiguration() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Borobudur-Kernel package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\Kernel;
12
13
use Borobudur\Config\Configuration;
14
use Borobudur\DependencyInjection\ContainerBuilder;
15
use Borobudur\Kernel\Bundling\ExtensionManager;
16
17
/**
18
 * @author      Iqbal Maulana <[email protected]>
19
 * @created     8/17/15
20
 */
21
class KernelServiceLocator
22
{
23
    /**
24
     * @var ContainerBuilder
25
     */
26
    private $container;
27
28
    /**
29
     * Constructor.
30
     *
31
     * @param ContainerBuilder $container
32
     */
33
    public function __construct(ContainerBuilder $container)
34
    {
35
        $this->container = $container;
36
    }
37
38
    /**
39
     * Get extension manager.
40
     *
41
     * @return ExtensionManager
42
     */
43
    public function getExtension()
44
    {
45
        return $this->container->get('extension_manager');
46
    }
47
48
    /**
49
     * Get resource builder.
50
     *
51
     * @return ResourceBuilder
52
     */
53
    public function getResource()
54
    {
55
        return $this->container->get('resource');
56
    }
57
58
    /**
59
     * Get configuration.
60
     *
61
     * @return Configuration
62
     */
63
    public function getConfiguration()
64
    {
65
        return $this->container->get('config');
66
    }
67
}
68