-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfig.php
More file actions
70 lines (60 loc) · 2.43 KB
/
config.php
File metadata and controls
70 lines (60 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
declare(strict_types=1);
use Laminas\ConfigAggregator\ArrayProvider;
use Laminas\ConfigAggregator\ConfigAggregator;
use Laminas\ConfigAggregator\PhpFileProvider;
// To enable or disable caching, set the `ConfigAggregator::ENABLE_CACHE` boolean in
// `config/autoload/local.php`.
$cacheConfig = [
'config_cache_path' => 'data/cache/config-cache.php',
];
$aggregator = new ConfigAggregator([
\Laminas\HttpHandlerRunner\ConfigProvider::class,
\Laminas\Diactoros\ConfigProvider::class,
\Mezzio\Twig\ConfigProvider::class,
\Mezzio\Router\FastRouteRouter\ConfigProvider::class,
// Include cache configuration
new ArrayProvider($cacheConfig),
\Mezzio\Helper\ConfigProvider::class,
\Mezzio\ConfigProvider::class,
\Mezzio\Router\ConfigProvider::class,
\Mezzio\Cors\ConfigProvider::class,
// Swoole config to overwrite some services (if installed)
class_exists(\Mezzio\Swoole\ConfigProvider::class)
? \Mezzio\Swoole\ConfigProvider::class
: function () {
return [];
},
// Dotkernel packages
\Dot\Session\ConfigProvider::class,
\Dot\Mail\ConfigProvider::class,
\Laminas\Form\ConfigProvider::class,
\Dot\Log\ConfigProvider::class,
\Dot\ErrorHandler\ConfigProvider::class,
\Dot\DependencyInjection\ConfigProvider::class,
\Dot\Twig\ConfigProvider::class,
\Dot\FlashMessenger\ConfigProvider::class,
\Dot\Rbac\ConfigProvider::class,
\Dot\Rbac\Guard\ConfigProvider::class,
\Dot\ResponseHeader\ConfigProvider::class,
\Dot\DataFixtures\ConfigProvider::class,
\Dot\Cache\ConfigProvider::class,
\Dot\Helpers\ConfigProvider::class,
\Dot\Navigation\ConfigProvider::class,
// Default App module config
\Frontend\App\ConfigProvider::class,
\Frontend\Contact\ConfigProvider::class,
\Frontend\Page\ConfigProvider::class,
\Frontend\Plugin\ConfigProvider::class,
\Frontend\User\ConfigProvider::class,
// Load application config in a pre-defined order in such a way that local settings
// overwrite global settings. (Loaded as first to last):
// - `global.php`
// - `*.global.php`
// - `local.php`
// - `*.local.php`
new PhpFileProvider(realpath(__DIR__) . '/autoload/{{,*.}global,{,*.}local}.php'),
// Load development config if it exists
new PhpFileProvider(realpath(__DIR__) . '/development.config.php'),
], $cacheConfig['config_cache_path']);
return $aggregator->getMergedConfig();