1 | <?php |
||
14 | class Core implements SystemInterface |
||
15 | { |
||
16 | /** @var string Current system environment */ |
||
17 | protected $environment; |
||
18 | |||
19 | /** @var Module[] Loaded modules collection */ |
||
20 | protected $modules; |
||
21 | |||
22 | /** |
||
23 | * Core constructor |
||
24 | */ |
||
25 | public function __construct() |
||
30 | |||
31 | /** |
||
32 | * Change current system working environment. |
||
33 | * |
||
34 | * @param string $environment Environment identifier |
||
35 | * |
||
36 | * @return $this Chaining |
||
37 | */ |
||
38 | public function environment($environment = Scheme::BASE) |
||
47 | |||
48 | /** |
||
49 | * Load module. |
||
50 | * |
||
51 | * @param ModuleInterface $instance Module ancestor for loading |
||
52 | * |
||
53 | * @return $this Chaining |
||
54 | */ |
||
55 | public function load($instance, $alias = null) |
||
62 | |||
63 | /** |
||
64 | * Start SamsonPHP framework. |
||
65 | * |
||
66 | * @param string $default Default module identifier |
||
67 | */ |
||
68 | public function start($default) |
||
109 | } |
||
110 |