1 | <?php |
||
11 | class App |
||
12 | { |
||
13 | /** |
||
14 | * @var ContainerBuilder |
||
15 | */ |
||
16 | protected static $container; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected static $configDefaults = [ |
||
22 | 'environment' => 'development', |
||
23 | 'directories.src' => './src', |
||
24 | 'directories.public' => './public', |
||
25 | 'directories.cache' => './.cache', |
||
26 | 'directories.htaccess' => './public/.htaccess', |
||
27 | 'meta' => [], |
||
28 | 'minify' => false, |
||
29 | 'engines.template' => 'smarty', |
||
30 | 'engines.image' => 'gd', |
||
31 | 'engines.optimizer' => true, |
||
32 | 'engines.async' => true, |
||
33 | 'cdn' => [], |
||
34 | 'caches.image' => true, |
||
35 | 'caches.cdn' => true, |
||
36 | 'optimizer.options' => [], |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * @param string $configPath |
||
41 | * @param array $defaultConfig |
||
42 | * |
||
43 | * @return App |
||
44 | */ |
||
45 | public static function init(string $configPath = './config.yml', array $defaultConfig = []) : App { |
||
70 | |||
71 | /** |
||
72 | * @param string $id |
||
73 | * |
||
74 | * @return mixed |
||
75 | */ |
||
76 | public static function get(string $id) { |
||
79 | |||
80 | /** |
||
81 | * @param string $id |
||
82 | * @param Application $application |
||
83 | */ |
||
84 | public static function setApplication(string $id, Application $application) { |
||
87 | |||
88 | /** |
||
89 | * @param string $key |
||
90 | * |
||
91 | * @return mixed |
||
92 | */ |
||
93 | public static function getParameter(string $key) { |
||
96 | |||
97 | } |
||
98 |