1 | <?php |
||
32 | class System extends Configuration |
||
33 | { |
||
34 | /** |
||
35 | * @var Objects The backend container |
||
36 | */ |
||
37 | protected $backend; |
||
38 | /** |
||
39 | * @var Objects The frontend container |
||
40 | */ |
||
41 | protected $frontend; |
||
42 | |||
43 | /** |
||
44 | * Creates a new System. |
||
45 | * |
||
46 | * This constructor expects an array full of class names in the `$modules` |
||
47 | * parameter. Each class name *must* extend `Caridea\Module\Module` or an |
||
48 | * `UnexpectedValueException` will be thrown. |
||
49 | * |
||
50 | * @param array<string> $modules An array of module class names |
||
51 | * @param array<string,mixed> $config The system configuration |
||
52 | * @throws \UnexpectedValueException if a module class doesn't extend `Minotaur\Module` |
||
53 | */ |
||
54 | 1 | public function __construct(array $modules, array $config) |
|
60 | |||
61 | 1 | private function createBackendContainer(Properties $parent): Objects |
|
69 | |||
70 | 1 | private function createFrontendContainer(Objects $parent): Objects |
|
78 | |||
79 | /** |
||
80 | * Gets the container with backend classes. |
||
81 | * |
||
82 | * @return \Caridea\Container\Objects The backend container |
||
83 | */ |
||
84 | 1 | public function getBackendContainer(): Objects |
|
88 | |||
89 | /** |
||
90 | * Gets the container with frontend classes. |
||
91 | * |
||
92 | * @return \Caridea\Container\Objects The frontend container |
||
93 | */ |
||
94 | 1 | public function getFrontendContainer(): Objects |
|
98 | } |
||
99 |