Test Failed
Push — master ( 1a1530...6c5027 )
by 世昌
02:33
created

Application::loadFrom()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
namespace nebula;
3
4
use nebula\component\loader\Loader;
5
6
/**
7
 * 应用
8
 *
9
 */
10
class Application
11
{
12
    /**
13
     * 应用路径
14
     *
15
     * @var string
16
     */
17
    protected $path;
18
    /**
19
     * 类加载器
20
     *
21
     * @var Loader
22
     */
23
    protected $classLoader;
24
    
25
26
    /**
27
     * Get 类加载器
28
     *
29
     * @return  Loader
30
     */
31
    public function getClassLoader()
32
    {
33
        return $this->classLoader;
34
    }
35
36
    /**
37
     * Set 类加载器
38
     *
39
     * @param  Loader  $classLoader  类加载器
40
     *
41
     * @return  self
42
     */
43
    public function setClassLoader(Loader $classLoader)
44
    {
45
        $this->classLoader = $classLoader;
46
47
        return $this;
48
    }
49
50
    /**
51
     * 从文件夹加载应用
52
     *
53
     * @param string $path
54
     * @return self
55
     */
56
    public function loadFrom(string $path) {
57
        $this->path = $path;
58
    }
59
}
60