shlink/config/config.php

27 lines
1,012 B
PHP
Raw Normal View History

2016-04-10 10:38:07 +03:00
<?php
2016-08-14 22:28:21 +03:00
use Acelaya\ExpressiveErrorHandler;
2016-07-19 17:50:02 +03:00
use Shlinkio\Shlink\CLI;
2016-07-19 18:38:41 +03:00
use Shlinkio\Shlink\Common;
2016-07-19 19:01:39 +03:00
use Shlinkio\Shlink\Core;
2016-07-19 18:07:59 +03:00
use Shlinkio\Shlink\Rest;
use Zend\Expressive\ConfigManager;
2016-04-10 10:38:07 +03:00
/**
* Configuration files are loaded in a specific order. First ``global.php``, then ``*.global.php``.
* then ``local.php`` and finally ``*.local.php``. This way local settings overwrite global settings.
*
* The configuration can be cached. This can be done by setting ``config_cache_enabled`` to ``true``.
*
* Obviously, if you use closures in your config you can't cache it.
*/
return (new ConfigManager\ConfigManager([
2016-08-14 22:28:21 +03:00
ExpressiveErrorHandler\ConfigProvider::class,
Common\ConfigProvider::class,
Core\ConfigProvider::class,
CLI\ConfigProvider::class,
Rest\ConfigProvider::class,
new ConfigManager\ZendConfigProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
new ConfigManager\PhpFileProvider('config/params/generated_config.php'),
], 'data/cache/app_config.php'))->getMergedConfig();