1 | <?php |
||
24 | class ComponentManager implements ComponentManagerInterface |
||
25 | { |
||
26 | /** |
||
27 | * Name of the component class to look for. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected static $componentClassName = 'FuelComponent'; |
||
32 | |||
33 | /** |
||
34 | * @var ComponentInterface[] |
||
35 | */ |
||
36 | protected $loadedComponents = []; |
||
37 | |||
38 | /** |
||
39 | * @var Finder |
||
40 | */ |
||
41 | protected $finder; |
||
42 | |||
43 | 13 | public function __construct(Finder $finder) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 1 | public function get(string $name) : ComponentInterface |
|
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | 8 | public function load(string $name) : ComponentInterface |
|
89 | |||
90 | 6 | protected function addPath(ComponentInterface $component) |
|
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | 3 | public function loaded(string $name) : bool |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | 1 | public function unload(string $name) : ComponentManagerInterface |
|
115 | |||
116 | } |
||
117 |