1 | <?php |
||
23 | class ComponentManager implements ComponentManagerInterface |
||
24 | { |
||
25 | /** |
||
26 | * Name of the component class to look for. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected static $componentClassName = 'FuelComponent'; |
||
31 | |||
32 | /** |
||
33 | * @var ComponentInterface[] |
||
34 | */ |
||
35 | protected $loadedComponents = []; |
||
36 | |||
37 | /** |
||
38 | * @var Container |
||
39 | */ |
||
40 | protected $configContainer; |
||
41 | |||
42 | 10 | public function __construct(Container $configContainer) |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function get(string $name) : ComponentInterface |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 5 | public function load(string $name) : ComponentInterface |
|
88 | |||
89 | 3 | protected function addConfigPath(ComponentInterface $component) |
|
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | 3 | public function loaded(string $name) : bool |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | 1 | public function unload(string $name) : ComponentManagerInterface |
|
114 | |||
115 | } |
||
116 |