| Conditions | 3 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function register(Container $app) |
||
| 12 | { |
||
| 13 | $app['config'] = static function ($app) { |
||
| 14 | // @deprecated |
||
| 15 | // define XHGUI_ROOT_DIR constant, config files may use it |
||
| 16 | if (!defined('XHGUI_ROOT_DIR')) { |
||
| 17 | define('XHGUI_ROOT_DIR', $app['app.dir']); |
||
| 18 | } |
||
| 19 | |||
| 20 | Config::load($app['app.config_dir'] . '/config.default.php'); |
||
| 21 | |||
| 22 | if (file_exists($app['app.config_dir'] . '/config.php')) { |
||
| 23 | Config::load($app['app.config_dir'] . '/config.php'); |
||
| 24 | } |
||
| 25 | |||
| 26 | return Config::all(); |
||
| 27 | }; |
||
| 28 | } |
||
| 29 | } |
||
| 30 |