-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.php
More file actions
78 lines (72 loc) · 1.64 KB
/
Config.php
File metadata and controls
78 lines (72 loc) · 1.64 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
71
72
73
74
75
76
77
78
<?php
/**
* Config.
*/
namespace Quark;
use Noodlehaus\AbstractConfig;
use Quark\Twig\Extensions\QuarkExtension;
/**
* Config class.
*/
class Config extends AbstractConfig
{
/**
* Creates an instance of Config.
*
* @param array $data Data.
*/
public function __construct($data = [])
{
$this->data = array_merge_deep($this->getDefaults(), $data);
}
/**
* Default configuration.
*
* @return array Default configuration.
*/
protected function getDefaults()
{
return [
'old_browser' => [
[
'name' => 'Internet Explorer',
'comparison' => '<=',
'version' => '10'
]
],
'locale' => [
'code' => 'en',
'country' => '',
'redirectIfOne' => false
],
'paths' => [
'locales' => base_path('locales/{{locale}}.yml'),
'routes' => base_path('routes.yml'),
'manifest' => base_path('manifest.json')
],
'twig' => [
'layouts' => [
'default' => 'default',
'old_browser' => 'old'
],
'extension' => '.twig',
'cache' => base_path('cache'),
'extraData' => [],
'paths' => [
'views' => base_path('views'),
'layouts' => base_path('views/layouts'),
'pages' => base_path('views/pages'),
'components' => base_path('views/components')
],
'extensions' => [
'quark' => new QuarkExtension(),
'html_compress' => new \nochso\HtmlCompressTwig\Extension()
],
'filters' => [],
'globals' => [],
'functions' => [],
'tests' => []
]
];
}
}