2016-04-10 09:38:07 +02:00
|
|
|
<?php
|
2017-10-12 10:13:20 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2016-08-14 21:28:21 +02:00
|
|
|
use Acelaya\ExpressiveErrorHandler;
|
2016-07-19 16:50:02 +02:00
|
|
|
use Shlinkio\Shlink\CLI;
|
2016-07-19 17:38:41 +02:00
|
|
|
use Shlinkio\Shlink\Common;
|
2016-07-19 18:01:39 +02:00
|
|
|
use Shlinkio\Shlink\Core;
|
2016-07-19 17:07:59 +02:00
|
|
|
use Shlinkio\Shlink\Rest;
|
2017-03-24 20:34:18 +01:00
|
|
|
use Zend\ConfigAggregator;
|
2016-04-10 09:38:07 +02: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.
|
|
|
|
*/
|
|
|
|
|
2017-03-24 20:34:18 +01:00
|
|
|
return (new ConfigAggregator\ConfigAggregator([
|
2018-03-21 01:46:26 +02:00
|
|
|
Zend\Expressive\ConfigProvider::class,
|
|
|
|
Zend\Expressive\Router\ConfigProvider::class,
|
2016-08-14 21:28:21 +02:00
|
|
|
ExpressiveErrorHandler\ConfigProvider::class,
|
2016-07-19 23:35:47 +02:00
|
|
|
Common\ConfigProvider::class,
|
|
|
|
Core\ConfigProvider::class,
|
|
|
|
CLI\ConfigProvider::class,
|
|
|
|
Rest\ConfigProvider::class,
|
2017-03-24 20:34:18 +01:00
|
|
|
new ConfigAggregator\ZendConfigProvider('config/{autoload/{{,*.}global,{,*.}local},params/generated_config}.php'),
|
2016-07-19 23:35:47 +02:00
|
|
|
], 'data/cache/app_config.php'))->getMergedConfig();
|