KernelServiceLocator::__construct()   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
 * 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