Locator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A start() 0 4 1
A get() 0 4 1
1
<?php
2
3
/**
4
 * Holds a class loader instance
5
 *
6
 * PHP Version 5
7
 *
8
 * @category  Core
9
 * @package   Service
10
 * @author    Hans-Joachim Piepereit <[email protected]>
11
 * @copyright 2013 cSphere Team
12
 * @license   http://opensource.org/licenses/bsd-license Simplified BSD License
13
 * @link      http://www.csphere.eu
14
 **/
15
16
namespace csphere\core\service;
17
18
/**
19
 * Holds a class loader instance
20
 *
21
 * @category  Core
22
 * @package   Service
23
 * @author    Hans-Joachim Piepereit <[email protected]>
24
 * @copyright 2013 cSphere Team
25
 * @license   http://opensource.org/licenses/bsd-license Simplified BSD License
26
 * @link      http://www.csphere.eu
27
 **/
28
29
abstract class Locator
30
{
31
    /**
32
     * Store loader object
33
     **/
34
35
    private static $_loader = null;
36
37
    /**
38
     * Creates the instance of the class loader
39
     *
40
     * @param array $config Array with config flags to store
41
     *
42
     * @return object
43
     **/
0 ignored issues
show
Coding Style introduced by
There must be no blank lines after the function comment
Loading history...
44
45
    public static function start(array $config)
46
    {
47
        self::$_loader = new \csphere\core\service\Loader($config);
48
    }
49
50
    /**
51
     * Provides the class loader object
52
     *
53
     * @return \csphere\core\service\Loader
54
     **/
0 ignored issues
show
Coding Style introduced by
There must be no blank lines after the function comment
Loading history...
55
56
    public static function get()
57
    {
58
        return self::$_loader;
59
    }
60
}
61