/
Default.php
122 lines (120 loc) · 4.01 KB
/
Default.php
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
// Load custom config
if (file_exists($this->DocPath() . 'config_' . $this->Environment() . '.php')) {
$customConfig = $this->loadConfig($this->DocPath() . 'config_' . $this->Environment() . '.php');
} elseif (file_exists($this->DocPath() . 'config.php')) {
$customConfig = $this->loadConfig($this->DocPath() . 'config.php');
} else {
$customConfig = [];
}
if (!is_array($customConfig)) {
throw new Enlight_Exception('The custom configuration file must return an array.');
}
return array_replace_recursive([
'custom' => [],
'trustedproxies' => [],
'snippet' => [
'readFromDb' => true,
'writeToDb' => true,
'readFromIni' => false,
'writeToIni' => false,
],
'db' => [
'username' => 'root',
'password' => '',
'dbname' => 'shopware',
'host' => 'localhost',
'charset' => 'utf8',
'adapter' => 'pdo_mysql'
],
'front' => [
'noErrorHandler' => false,
'throwExceptions' => false,
'disableOutputBuffering' => false,
'showException' => false,
'charset' => 'utf-8'
],
'config' => [],
'store' => [
'apiEndpoint' => 'https://api.shopware.com',
],
'plugins' => [],
'template' => [
'compileCheck' => true,
'compileLocking' => true,
'useSubDirs' => true,
'forceCompile' => false,
'useIncludePath' => true,
'charset' => 'utf-8',
'forceCache' => false,
'cacheDir' => $this->getCacheDir().'/templates',
'compileDir' => $this->getCacheDir().'/templates',
],
'mail' => [
'charset' => 'utf-8'
],
'httpcache' => [
'enabled' => true,
'debug' => false,
'default_ttl' => 0,
'private_headers' => ['Authorization', 'Cookie'],
'allow_reload' => false,
'allow_revalidate' => false,
'stale_while_revalidate' => 2,
'stale_if_error' => false,
'cache_dir' => $this->getCacheDir().'/html',
'cache_cookies' => ['shop', 'currency'],
],
'session' => [
'name' => 'SHOPWARESID',
'cookie_lifetime' => 0,
//'cookie_httponly' => 1,
'use_trans_sid' => false,
'gc_probability' => 1,
'gc_divisor' => 100,
'save_handler' => 'db'
],
'phpsettings' => [
'error_reporting' => E_ALL,
'display_errors' => 1,
'date.timezone' => 'Europe/Berlin',
],
'cache' => [
'frontendOptions' => [
'automatic_serialization' => true,
'automatic_cleaning_factor' => 0,
'lifetime' => 3600,
'cache_id_prefix' => md5($this->getCacheDir())
],
'backend' => 'auto', // e.G auto, apc, xcache
'backendOptions' => [
'hashed_directory_perm' => 0771,
'cache_file_perm' => 0644,
'hashed_directory_level' => 3,
'cache_dir' => $this->getCacheDir().'/general',
'file_name_prefix' => 'shopware'
],
],
'hook' => [
'proxyDir' => $this->getCacheDir().'/proxies',
'proxyNamespace' => $this->App() . '_Proxies'
],
'model' => [
'autoGenerateProxyClasses' => false,
'fileCacheDir' => $this->getCacheDir().'/doctrine/filecache',
'attributeDir' => $this->getCacheDir().'/doctrine/attributes',
'proxyDir' => $this->getCacheDir().'/doctrine/proxies',
'proxyNamespace' => $this->App() . '\Proxies',
'cacheProvider' => 'auto', // supports null, auto, Apc, Array, Wincache and Xcache
'cacheNamespace' => null // custom namespace for doctrine cache provider (optional; null = auto-generated namespace)
],
'backendsession' => [
'name' => 'SHOPWAREBACKEND',
// 'gc_maxlifetime' => 60 * 90,
'cookie_lifetime' => 0,
'cookie_httponly' => 1,
'use_trans_sid' => false,
'referer_check' => true, // true, false or a fix value
'client_check' => false // true or false (is not compatible with firebug)
],
], $customConfig);