Passed
Push — master ( b017fa...6506ed )
by Julien
05:31 queued 23s
created

Config::__construct()   B

Complexity

Conditions 5
Paths 1

Size

Total Lines 1421
Code Lines 900

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1147
CRAP Score 5

Importance

Changes 21
Bugs 6 Features 6
Metric Value
cc 5
eloc 900
c 21
b 6
f 6
nc 1
nop 2
dl 0
loc 1421
ccs 1147
cts 1147
cp 1
crap 5
rs 7.6888

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Bootstrap;
13
14
use PDO;
15
use Phalcon\Db\Column;
16
use Phalcon\Encryption\Security;
17
use Zemit\Bootstrap\Permissions\TableConfig;
18
use Zemit\Bootstrap\Permissions\UserConfig;
19
use Zemit\Bootstrap\Permissions\WorkspaceConfig;
20
use Zemit\Locale;
21
use Zemit\Support\Version;
22
use Zemit\Provider;
23
use Zemit\Utils\Env;
24
use Zemit\Models;
25
use Zemit\Modules\Cli;
26
use Zemit\Modules\Api;
27
use Zemit\Mvc\Controller\Behavior;
28
use Phalcon\Config\Config as PhalconConfig;
29
use Phalcon\Support\Version as PhalconVersion;
30
31
/**
32
 * Global Zemit Configuration
33
 *
34
 * @property PhalconConfig $phalcon
35
 * @property PhalconConfig $core
36
 * @property PhalconConfig $app
37
 * @property PhalconConfig $php
38
 * @property PhalconConfig $debug
39
 * @property PhalconConfig $response
40
 * @property PhalconConfig $identity
41
 * @property PhalconConfig $models
42
 * @property PhalconConfig $providers
43
 * @property PhalconConfig $logger
44
 * @property PhalconConfig $filters
45
 * @property PhalconConfig $modules
46
 * @property PhalconConfig $router
47
 * @property PhalconConfig $gravatar
48
 * @property PhalconConfig $reCaptcha
49
 * @property PhalconConfig $aws
50
 * @property PhalconConfig $locale
51
 * @property PhalconConfig $translate
52
 * @property PhalconConfig $session
53
 * @property PhalconConfig $module
54
 * @property PhalconConfig $security
55
 * @property PhalconConfig $cache
56
 * @property PhalconConfig $metadata
57
 * @property PhalconConfig $annotations
58
 * @property PhalconConfig $mailer
59
 * @property PhalconConfig $cookies
60
 * @property PhalconConfig $oauth2
61
 * @property PhalconConfig $dotenv
62
 * @property PhalconConfig $client
63
 * @property PhalconConfig $permissions
64
 */
65
class Config extends \Zemit\Config\Config
66
{
67 48
    public function defineConst()
68
    {
69 48
        defined('VENDOR_PATH') || define('VENDOR_PATH', Env::get('ROOT_PATH', 'vendor/'));
70 48
        defined('ROOT_PATH') || define('ROOT_PATH', Env::get('ROOT_PATH'));
71 48
        defined('APP_PATH') || define('APP_PATH', Env::get('APP_PATH'));
72 48
        defined('APPLICATION_ENV') || define('APPLICATION_ENV', Env::get('APPLICATION_ENV', 'development'));
73 48
        defined('CORE_PATH') || define('CORE_PATH', Env::get('CORE_PATH', mb_substr(__DIR__, 0, mb_strlen(basename(__DIR__)) * -1)));
74 48
        defined('PRIVATE_PATH') || define('PRIVATE_PATH', Env::get('APP_PRIVATE_PATH', constant('APP_PATH') . '/private/'));
75
    }
76
    
77
    /**
78
     * Config Constructor
79
     * {@inheritDoc}
80
     */
81 48
    public function __construct(array $data = [], bool $insensitive = false)
82
    {
83 48
        $this->defineConst();
84 48
        $now = new \DateTimeImmutable();
85 48
        $data = $this->internalMergeAppend([
86
            
87
            /**
88
             * Phalcon settings
89
             */
90 48
            'phalcon' => [
91 48
                'name' => 'Phalcon Framework',
92 48
                'version' => (new PhalconVersion())->get(),
93 48
            ],
94
            
95
            /**
96
             * Core settings
97
             */
98 48
            'core' => [
99 48
                'name' => 'Zemit Core',
100 48
                'version' => (new Version())->get(),
101 48
                'package' => 'zemit-cms',
102 48
                'modules' => [
103 48
                    'zemit-' . \Zemit\Mvc\Module::NAME_FRONTEND => [
104 48
                        'className' => \Zemit\Modules\Frontend\Module::class,
105 48
                        'path' => CORE_PATH . 'Modules/Frontend/Module.php',
106 48
                    ],
107 48
                    'zemit-' . \Zemit\Mvc\Module::NAME_ADMIN => [
108 48
                        'className' => \Zemit\Modules\Admin\Module::class,
109 48
                        'path' => CORE_PATH . 'Modules/Admin/Module.php',
110 48
                    ],
111 48
                    'zemit-' . \Zemit\Mvc\Module::NAME_API => [
112 48
                        'className' => \Zemit\Modules\Api\Module::class,
113 48
                        'path' => CORE_PATH . 'Modules/Api/Module.php',
114 48
                    ],
115 48
                    'zemit-' . \Zemit\Mvc\Module::NAME_OAUTH2 => [
116 48
                        'className' => \Zemit\Modules\Oauth2\Module::class,
117 48
                        'path' => CORE_PATH . 'Modules/Oauth2/Module.php',
118 48
                    ],
119 48
                    'zemit-' . \Zemit\Cli\Module::NAME_CLI => [
120 48
                        'className' => \Zemit\Modules\Cli\Module::class,
121 48
                        'path' => CORE_PATH . 'Modules/Cli/Module.php',
122 48
                    ],
123 48
                ],
124 48
                'dir' => [
125 48
                    'base' => CORE_PATH,
126 48
                    'locales' => CORE_PATH . 'Locales',
127 48
                    'modules' => CORE_PATH . 'Modules',
128 48
                ],
129 48
            ],
130
            
131
            /**
132
             * Application configuration
133
             */
134 48
            'app' => [
135 48
                'name' => Env::get('APP_NAME', 'Zemit'), // Name of your application
136 48
                'namespace' => Env::get('APP_NAMESPACE', 'Zemit'), // Namespace of your application
137 48
                'version' => Env::get('APP_VERSION', date('Ymd')), // allow to set and force a specific version
138 48
                'maintenance' => Env::get('APP_MAINTENANCE', false), // Set true to force the maintenance page
139 48
                'env' => Env::get('APP_ENV', Env::get('APPLICATION_ENV', null)), // Set the current environment
140 48
                'debug' => Env::get('APP_DEBUG', false), // Set true to display debug
141 48
                'cache' => Env::get('APP_CACHE', false), // Set true to activate the cache
142 48
                'minify' => Env::get('APP_MINIFY', false), // Set true to activate minifying
143 48
                'copyright' => Env::get('APP_COPYRIGHT', false), // Set true to activate the copyright
144 48
                'profiler' => Env::get('APP_PROFILER', false), // Set true to return the profiler
145 48
                'logger' => Env::get('APP_LOGGER', false), // Set true to enable logging
146 48
                'uri' => Env::get('APP_URI', '/'), // Base URI of your application
147 48
                'staticUri' => Env::get('APP_STATIC_URI', '/'), // Base URI of your application
148 48
                'encoding' => Env::get('APP_ENCODING', 'UTF-8'), // allow to set encoding to use with the application
149 48
                'timezone' => Env::get('APP_TIMEZONE', 'America/Montreal'), // allow to set timezone to use with the application
150 48
                'timeoutLimit' => Env::get('APP_TIMEOUT_LIMIT', 60), // allow to set timeout limit to use with the application
151 48
                'memoryLimit' => Env::get('APP_MEMORY_LIMIT', '256M'), // allow to set timeout limit to use with the application
152 48
                'sendEmail' => Env::get('APP_SEND_EMAIL', false), // allow to send real email or not
153
                
154 48
                'dir' => [
155
                    // project
156 48
                    'root' => Env::get('APP_ROOT_PATH', defined('ROOT_PATH') ? ROOT_PATH ?: getcwd() : getcwd()),
157 48
                    'vendor' => Env::get('APP_VENDOR_PATH', VENDOR_PATH),
158 48
                    'app' => Env::get('APP_PATH', APP_PATH . '/'),
159 48
                    'public' => Env::get('APP_PUBLIC_PATH', getcwd()),
160
                    
161
                    // app
162 48
                    'bootstrap' => Env::get('APP_BOOTSTRAP_PATH', APP_PATH . '/Bootstrap/'),
163 48
                    'common' => Env::get('APP_COMMON_PATH', APP_PATH . '/Common/'),
164 48
                    'config' => Env::get('APP_CONFIG_PATH', APP_PATH . '/Config/'),
165 48
                    'modules' => Env::get('APP_MODULES_PATH', APP_PATH . '/Modules/'),
166 48
                    'plugins' => Env::get('APP_PLUGINS_PATH', APP_PATH . '/Plugins/'),
167 48
                    'private' => PRIVATE_PATH,
168
                    
169
                    // private
170 48
                    'cache' => Env::get('APP_CACHE_PATH', PRIVATE_PATH . '/cache/'),
171 48
                    'log' => Env::get('APP_LOG_PATH', PRIVATE_PATH . '/log/'),
172 48
                    'files' => Env::get('APP_FILE_PATH', PRIVATE_PATH . '/files/'),
173 48
                    'trash' => Env::get('APP_TRASH_PATH', PRIVATE_PATH . '/trash/'),
174 48
                    'tmp' => Env::get('APP_TMP_PATH', PRIVATE_PATH . '/tmp/'),
175 48
                    'migrations' => Env::get('APP_MIGRATION_PATH', PRIVATE_PATH . '/migrations/'),
176 48
                ],
177 48
            ],
178
            
179 48
            'url' => [
180 48
                'staticBaseUri' => Env::get('URL_STATIC_BASE_URI', null),
181 48
                'baseUri' => Env::get('URL_BASE_URI', '/'),
182 48
                'basePath' => Env::get('URL_BASE_PATH', '/'),
183 48
            ],
184
            
185 48
            'php' => [
186 48
                'locale' => [
187 48
                    'category' => Env::get('PHP_LOCALE_CATEGORY', LC_ALL),
188 48
                    'rest' => explode(',', Env::get('PHP_LOCALE_REST', 'fr_CA.UTF-8,French_Canada.1252')),
189 48
                ],
190 48
                'date' => [
191 48
                    'timezone' => Env::get('PHP_DATE_TIMEZONE', 'America/Montreal'),
192 48
                ],
193 48
                'ini' => [
194 48
                    'zend.exception_ignore_args' => Env::get('PHP_INI_ZEND_EXCEPTION_IGNORE_ARGS', 'On'),
195 48
                ],
196 48
            ],
197
            
198
            /**
199
             * Debug Configuration
200
             */
201 48
            'debug' => [
202 48
                'enable' => Env::get('DEBUG_ENABLE', false),
203 48
                'exception' => Env::get('DEBUG_EXCEPTION', true),
204 48
                'lowSeverity' => Env::get('DEBUG_LOW_SEVERITY', false),
205 48
                'showFiles' => Env::get('DEBUG_SHOW_FILES', true),
206 48
                'showBackTrace' => Env::get('DEBUG_SHOW_BACKTRACE', true),
207 48
                'showFileFragment' => Env::get('DEBUG_SHOW_FRAGMENT', true),
208 48
                'uri' => Env::get('DEBUG_URI'),
209 48
                'blacklist' => [
210 48
                    'server' => [
211 48
                        'PWD',
212 48
                        'PASS',
213 48
                        'PASSWD',
214 48
                        'PASSWORD',
215 48
                        'TOKEN',
216 48
                        'HASH',
217 48
                        'DB_PWD',
218 48
                        'DB_PASS',
219 48
                        'DB_PASSWD',
220 48
                        'DB_PASSWORD',
221 48
                        'DATABASE_PWD',
222 48
                        'DATABASE_PASS',
223 48
                        'DATABASE_PASSWD',
224 48
                        'DATABASE_PASSWORD',
225 48
                        'SECURITY_WORK_FACTOR',
226 48
                        'SECURITY_SALT',
227 48
                        'PASSPHRASE',
228 48
                        'SECRET',
229 48
                        'API_SECRET',
230 48
                        'API_KEY',
231 48
                    ],
232 48
                ],
233 48
            ],
234
            
235
            /**
236
             * Response Provider Configuration
237
             * - Set default security headers
238
             */
239 48
            'response' => [
240 48
                'headers' => [
241 48
                    'Content-Security-Policy-Report-Only' => Env::get('RESPONSE_HEADER_CSP_REPORT_ONLY', ''),
242 48
                    'Strict-Transport-Security' => Env::get('RESPONSE_HEADER_STRICT_TRANSPORT_SECURITY', 'max-age=63072000; includeSubDomains; preload'),
243 48
                    'X-Content-Type-Options' => Env::get('RESPONSE_HEADER_CONTENT_TYPE_OPTIONS', 'nosniff'),
244 48
                    'X-Frame-Options' => Env::get('RESPONSE_HEADER_FRAME_OPTIONS', 'Deny'),
245 48
                    'X-XSS-Protection' => Env::get('RESPONSE_HEADER_XSS_PROTECTION', 0),
246 48
                ],
247 48
                'corsHeaders' => [
248 48
                    'Access-Control-Allow-Origin' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN', '*'),
249 48
                    'Access-Control-Allow-Methods' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_METHODS', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'),
250 48
                    'Access-Control-Allow-Headers' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_HEADERS', 'Origin, X-Requested-With, Content-Range, Content-Disposition, Content-Type, Authorization'),
251 48
                    'Access-Control-Allow-Credentials' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS', 'true'),
252 48
                    'Access-Control-Max-Age' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_MAX_AGE', '600'),
253 48
//                    'Access-Control-Expose-Headers' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS', '*'),
254 48
//                    'Access-Control-Request-Headers' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_REQUEST_HEADERS', ''),
255 48
//                    'Access-Control-Request-Method' => Env::get('RESPONSE_HEADER_ACCESS_CONTROL_REQUEST_METHOD', ''),
256 48
                ],
257 48
            ],
258
            
259
            /**
260
             * Identity Provider Configuration
261
             */
262 48
            'identity' => [
263 48
                'authorizationHeader' => Env::get('IDENTITY_AUTHORIZATION_HEADER', 'Authorization'),
264 48
                'adapter' => Env::get('IDENTITY_ADAPTER', 'session'), // session | database
265 48
                'mode' => Env::get('IDENTITY_SESSION_MODE', 'jwt'), // jwt | string
266 48
                'sessionKey' => Env::get('IDENTITY_SESSION_KEY', 'zemit-identity'),
267 48
                'sessionFallback' => Env::get('IDENTITY_SESSION_FALLBACK', false),
268 48
                'token' => [
269 48
                    'expiration' => $now->modify(Env::get('IDENTITY_TOKEN_EXPIRATION', '+1 day'))->getTimestamp(),
270 48
                ],
271 48
                'refreshToken' => [
272 48
                    'expiration' => $now->modify(Env::get('IDENTITY_REFRESH_TOKEN_EXPIRATION', '+7 day'))->getTimestamp(),
273 48
                ],
274 48
            ],
275
            
276
            /**
277
             *
278
             */
279 48
            'models' => [
280
                
281
                // Base system
282 48
                Models\Backup::class => Models\Backup::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\Backup was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
283 48
                Models\Audit::class => Models\Audit::class,
284 48
                Models\AuditDetail::class => Models\AuditDetail::class,
285 48
                Models\Log::class => Models\Log::class,
286 48
                Models\Email::class => Models\Email::class,
287 48
                Models\Job::class => Models\Job::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\Job was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
288 48
                Models\File::class => Models\File::class,
289 48
                Models\Session::class => Models\Session::class,
290 48
                Models\Flag::class => Models\Flag::class,
291 48
                Models\Setting::class => Models\Setting::class,
292
                
293
                // Translate
294 48
                Models\Lang::class => Models\Lang::class,
295 48
                Models\Translate::class => Models\Translate::class,
296 48
                Models\TranslateField::class => Models\TranslateField::class,
297 48
                Models\TranslateTable::class => Models\TranslateTable::class,
298
                
299
                // Site & CMS
300 48
                Models\Workspace::class => Models\Workspace::class,
301 48
                Models\WorkspaceLang::class => Models\WorkspaceLang::class,
302 48
                Models\Page::class => Models\Page::class,
303 48
                Models\Post::class => Models\Post::class,
304 48
                Models\Template::class => Models\Template::class,
305 48
                Models\Table::class => Models\Table::class,
306 48
                Models\Field::class => Models\Field::class,
307
                
308
                // User & Permissions
309 48
                Models\Profile::class => Models\Profile::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\Profile was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
310 48
                Models\User::class => Models\User::class,
311 48
                Models\UserType::class => Models\UserType::class,
312 48
                Models\UserGroup::class => Models\UserGroup::class,
313 48
                Models\UserRole::class => Models\UserRole::class,
314 48
                Models\UserFeature::class => Models\UserFeature::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\UserFeature was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
315
                
316
                // Role
317 48
                Models\Role::class => Models\Role::class,
318 48
                Models\RoleRole::class => Models\RoleRole::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\RoleRole was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
319 48
                Models\RoleFeature::class => Models\RoleFeature::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\RoleFeature was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
320
                
321
                // Group
322 48
                Models\Group::class => Models\Group::class,
323 48
                Models\GroupRole::class => Models\GroupRole::class,
324 48
                Models\GroupType::class => Models\GroupType::class,
325 48
                Models\GroupFeature::class => Models\GroupFeature::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\GroupFeature was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
326
                
327
                // Type
328 48
                Models\Type::class => Models\Type::class,
329
                
330
                // Feature
331 48
                Models\Feature::class => Models\Feature::class,
0 ignored issues
show
Bug introduced by
The type Zemit\Models\Feature was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
332 48
            ],
333
            
334 48
            'dataLifeCycle' => [
335 48
                'models' => [
336 48
                    Models\Log::class => Env::get('DATA_LIFE_CYCLE_LOG', 'triennially'),
337 48
                    Models\Email::class => Env::get('DATA_LIFE_CYCLE_EMAIL', 'triennially'),
338 48
                    Models\Session::class => Env::get('DATA_LIFE_CYCLE_SESSION', 'monthly'),
339 48
                    Models\Audit::class => Env::get('DATA_LIFE_CYCLE_AUDIT', 'quarterly'),
340 48
                    Models\AuditDetail::class => Env::get('DATA_LIFE_CYCLE_AUDIT_DETAIL', 'quarterly'),
341 48
                ],
342 48
                'policies' => [
343 48
                    'monthly' => [
344 48
                        'query' => [
345 48
                            'conditions' => 'createdAt < :createdAt:',
346 48
                            'bind' => ['createdAt' => $now->modify('-1 month')->format('Y-m-01 00:00:00')],
347 48
                            'bindTypes' => ['createdAt' => Column::BIND_PARAM_STR],
348 48
                        ],
349 48
                    ],
350 48
                    'quarterly' => [
351 48
                        'query' => [
352 48
                            'conditions' => 'createdAt < :createdAt:',
353 48
                            'bind' => ['createdAt' => $now->modify('-3 months')->format('Y-m-01 00:00:00')],
354 48
                            'bindTypes' => ['createdAt' => Column::BIND_PARAM_STR],
355 48
                        ],
356 48
                    ],
357 48
                    'yearly' => [
358 48
                        'query' => [
359 48
                            'conditions' => 'createdAt < :createdAt:',
360 48
                            'bind' => ['createdAt' => $now->modify('-1 year')->format('Y-01-01 00:00:00')],
361 48
                            'bindTypes' => ['createdAt' => Column::BIND_PARAM_STR],
362 48
                        ],
363 48
                    ],
364 48
                    'biennially' => [
365 48
                        'query' => [
366 48
                            'conditions' => 'createdAt < :createdAt:',
367 48
                            'bind' => ['createdAt' => $now->modify('-2 year')->format('Y-01-01 00:00:00')],
368 48
                            'bindTypes' => ['createdAt' => Column::BIND_PARAM_STR],
369 48
                        ],
370 48
                    ],
371 48
                    'triennially' => [
372 48
                        'query' => [
373 48
                            'conditions' => 'createdAt < :createdAt:',
374 48
                            'bind' => ['createdAt' => $now->modify('-3 year')->format('Y-01-01 00:00:00')],
375 48
                            'bindTypes' => ['createdAt' => Column::BIND_PARAM_STR],
376 48
                        ],
377 48
                    ],
378 48
                ],
379 48
            ],
380
            
381
            /**
382
             * Service Provider Configuration
383
             * expected => actual
384
             */
385 48
            'providers' => [
386
                // Application
387 48
                Provider\Application\ServiceProvider::class => Env::get('PROVIDER_APPLICATION', Provider\Application\ServiceProvider::class),
388 48
                Provider\Console\ServiceProvider::class => Env::get('PROVIDER_CONSOLE', Provider\Console\ServiceProvider::class),
389 48
                Provider\Debug\ServiceProvider::class => Env::get('PROVIDER_CONSOLE', Provider\Debug\ServiceProvider::class),
390 48
                Provider\Env\ServiceProvider::class => Env::get('PROVIDER_ENVIRONMENT', Provider\Env\ServiceProvider::class),
391 48
                Provider\Router\ServiceProvider::class => Env::get('PROVIDER_ROUTER', Provider\Router\ServiceProvider::class),
392 48
                Provider\Dispatcher\ServiceProvider::class => Env::get('PROVIDER_DISPATCHER', Provider\Dispatcher\ServiceProvider::class),
393 48
                Provider\Request\ServiceProvider::class => Env::get('PROVIDER_REQUEST', Provider\Request\ServiceProvider::class),
394 48
                Provider\Response\ServiceProvider::class => Env::get('PROVIDER_RESPONSE', Provider\Response\ServiceProvider::class),
395
                
396
                // Security
397 48
                Provider\Security\ServiceProvider::class => Env::get('PROVIDER_SECURITY', Provider\Security\ServiceProvider::class),
398 48
                Provider\Session\ServiceProvider::class => Env::get('PROVIDER_SESSION', Provider\Session\ServiceProvider::class),
399 48
                Provider\Cookies\ServiceProvider::class => Env::get('PROVIDER_COOKIES', Provider\Cookies\ServiceProvider::class),
400 48
                Provider\Crypt\ServiceProvider::class => Env::get('PROVIDER_CRYPT', Provider\Crypt\ServiceProvider::class),
401 48
                Provider\Filter\ServiceProvider::class => Env::get('PROVIDER_FILTER', Provider\Filter\ServiceProvider::class),
402 48
                Provider\Jwt\ServiceProvider::class => Env::get('PROVIDER_JWT', Provider\Jwt\ServiceProvider::class),
403 48
                Provider\ReCaptcha\ServiceProvider::class => Env::get('PROVIDER_CAPTCHA', Provider\ReCaptcha\ServiceProvider::class),
404
                
405
                // Language
406 48
                Provider\Locale\ServiceProvider::class => Env::get('PROVIDER_LOCALE', Provider\Locale\ServiceProvider::class),
407 48
                Provider\Translate\ServiceProvider::class => Env::get('PROVIDER_TRANSLATE', Provider\Translate\ServiceProvider::class),
408
                
409
                // View
410 48
                Provider\View\ServiceProvider::class => Env::get('PROVIDER_VIEW', Provider\View\ServiceProvider::class),
411 48
                Provider\Url\ServiceProvider::class => Env::get('PROVIDER_URL', Provider\Url\ServiceProvider::class),
412 48
                Provider\Volt\ServiceProvider::class => Env::get('PROVIDER_VOLT', Provider\Volt\ServiceProvider::class),
413 48
                Provider\Tag\ServiceProvider::class => Env::get('PROVIDER_TAG', Provider\Tag\ServiceProvider::class),
414 48
                Provider\Assets\ServiceProvider::class => Env::get('PROVIDER_ASSETS', Provider\Assets\ServiceProvider::class),
415 48
                Provider\Flash\ServiceProvider::class => Env::get('PROVIDER_FLASH', Provider\Flash\ServiceProvider::class),
416 48
                Provider\Escaper\ServiceProvider::class => Env::get('PROVIDER_ESCAPER', Provider\Escaper\ServiceProvider::class),
417 48
                Provider\Markdown\ServiceProvider::class => Env::get('PROVIDER_MARKDOWN', Provider\Markdown\ServiceProvider::class),
418
                
419
                // Database & Models
420 48
                Provider\Database\ServiceProvider::class => Env::get('PROVIDER_DATABASE', Provider\Database\ServiceProvider::class),
421 48
                Provider\DatabaseReadOnly\ServiceProvider::class => Env::get('PROVIDER_DATABASE_READ_ONLY', Provider\DatabaseReadOnly\ServiceProvider::class),
422 48
                Provider\ModelsManager\ServiceProvider::class => Env::get('PROVIDER_MODELS_MANAGER', Provider\ModelsManager\ServiceProvider::class),
423
                
424
                // Profiling & Logging
425 48
                Provider\Profiler\ServiceProvider::class => Env::get('PROVIDER_PROFILER', Provider\Profiler\ServiceProvider::class),
426 48
                Provider\Logger\ServiceProvider::class => Env::get('PROVIDER_LOGGER', Provider\Logger\ServiceProvider::class),
427
                
428
                // Caching
429 48
                Provider\Annotations\ServiceProvider::class => Env::get('PROVIDER_ANNOTATIONS', Provider\Annotations\ServiceProvider::class),
430 48
                Provider\ModelsMetadata\ServiceProvider::class => Env::get('PROVIDER_MODELS_METADATA', Provider\ModelsMetadata\ServiceProvider::class),
431 48
                Provider\ModelsCache\ServiceProvider::class => Env::get('PROVIDER_MODELS_CACHE', Provider\ModelsCache\ServiceProvider::class),
432 48
                Provider\Cache\ServiceProvider::class => Env::get('PROVIDER_CACHE', Provider\Cache\ServiceProvider::class),
433
                
434
                // Identity & Auth
435 48
                Provider\Identity\ServiceProvider::class => Env::get('PROVIDER_IDENTITY', Provider\Identity\ServiceProvider::class),
436 48
                Provider\Oauth2Client\ServiceProvider::class => Env::get('PROVIDER_OAUTH_2_FACEBOOK', Provider\Oauth2Client\ServiceProvider::class),
437 48
                Provider\Oauth2Server\ServiceProvider::class => Env::get('PROVIDER_OAUTH_2_FACEBOOK', Provider\Oauth2Server\ServiceProvider::class),
438 48
                Provider\Oauth2Facebook\ServiceProvider::class => Env::get('PROVIDER_OAUTH_2_FACEBOOK', Provider\Oauth2Facebook\ServiceProvider::class),
439 48
                Provider\Oauth2Google\ServiceProvider::class => Env::get('PROVIDER_OAUTH_2_GOOGLE', Provider\Oauth2Google\ServiceProvider::class),
440
    
441
                // Mailing
442 48
                Provider\Mailer\ServiceProvider::class => Env::get('PROVIDER_MAILER', Provider\Mailer\ServiceProvider::class),
443 48
                Provider\Imap\ServiceProvider::class => Env::get('PROVIDER_IMAP', Provider\Imap\ServiceProvider::class),
444
                
445
                // Others
446 48
                Provider\Version\ServiceProvider::class => Env::get('PROVIDER_VERSION', Provider\Version\ServiceProvider::class),
447 48
                Provider\Helper\ServiceProvider::class => Env::get('PROVIDER_HELPER', Provider\Helper\ServiceProvider::class),
448 48
                Provider\FileSystem\ServiceProvider::class => Env::get('PROVIDER_FILE_SYSTEM', Provider\FileSystem\ServiceProvider::class),
449 48
                Provider\Utils\ServiceProvider::class => Env::get('PROVIDER_UTILS', Provider\Utils\ServiceProvider::class),
450 48
                Provider\Aws\ServiceProvider::class => Env::get('PROVIDER_AWS', Provider\Aws\ServiceProvider::class),
451 48
                Provider\OCR\ServiceProvider::class => Env::get('PROVIDER_OCR', Provider\OCR\ServiceProvider::class),
452 48
                Provider\V8js\ServiceProvider::class => Env::get('PROVIDER_V8_JS', Provider\V8js\ServiceProvider::class),
453 48
                Provider\Gravatar\ServiceProvider::class => Env::get('PROVIDER_GRAVATAR', Provider\Gravatar\ServiceProvider::class),
454 48
                Provider\Clamav\ServiceProvider::class => Env::get('PROVIDER_CLAMAV', Provider\Clamav\ServiceProvider::class),
455 48
                Provider\OpenAi\ServiceProvider::class => Env::get('PROVIDER_OPENAI', Provider\OpenAi\ServiceProvider::class),
456 48
                Provider\LoremIpsum\ServiceProvider::class => Env::get('PROVIDER_LOREM_IPSUM', Provider\LoremIpsum\ServiceProvider::class),
457 48
            ],
458
            
459
            /**
460
             * Logger Configuration
461
             */
462 48
            'logger' => [
463 48
                'enable' => Env::get('LOGGER_ENABLE', false),
464
                
465 48
                'error' => Env::get('LOGGER_ERROR', false),
466 48
                'database' => Env::get('LOGGER_DATABASE', false),
467 48
                'dispatcher' => Env::get('LOGGER_DISPATCHER', false),
468 48
                'profiler' => Env::get('LOGGER_PROFILER', false),
469 48
                'mailer' => Env::get('LOGGER_MAILER', false),
470 48
                'cron' => Env::get('LOGGER_CRON', false),
471 48
                'auth' => Env::get('LOGGER_AUTH', false),
472
                
473 48
                'driver' => explode(',', Env::get('LOGGER_DRIVER', 'noop')),
474 48
                'drivers' => [
475 48
                    'noop' => [
476 48
                        'adapter' => \Phalcon\Logger\Adapter\Noop::class,
477 48
                    ],
478 48
                    'stream' => [
479 48
                        'adapter' => \Phalcon\Logger\Adapter\Stream::class,
480 48
                    ],
481 48
                    'syslog' => [
482 48
                        'adapter' => \Phalcon\Logger\Adapter\Syslog::class,
483 48
                    ],
484 48
                ],
485 48
                'default' => [
486 48
                    'path' => Env::get('LOGGER_PATH', PRIVATE_PATH . '/log/'),
487 48
                    'format' => Env::get('LOGGER_FORMAT', '[%date%][%type%] %message%'),
488 48
                    'date' => Env::get('LOGGER_DATE', 'Y-m-d H:i:s'),
489 48
                    'filename' => Env::get('LOGGER_DEFAULT_FILENAME', 'zemit'),
490 48
                ],
491 48
            ],
492
            
493
            /**
494
             * Default filters
495
             */
496 48
            'filters' => [
497 48
            ],
498
            
499
            /**
500
             * Default modules
501
             */
502 48
            'modules' => [
503 48
                \Zemit\Mvc\Module::NAME_FRONTEND => [
504 48
                    'className' => \Zemit\Modules\Frontend\Module::class,
505 48
                    'path' => CORE_PATH . 'Modules/Frontend/Module.php',
506 48
                ],
507 48
                \Zemit\Mvc\Module::NAME_ADMIN => [
508 48
                    'className' => \Zemit\Modules\Admin\Module::class,
509 48
                    'path' => CORE_PATH . 'Modules/Admin/Module.php',
510 48
                ],
511 48
                \Zemit\Mvc\Module::NAME_API => [
512 48
                    'className' => \Zemit\Modules\Api\Module::class,
513 48
                    'path' => CORE_PATH . 'Modules/Api/Module.php',
514 48
                ],
515 48
                \Zemit\Mvc\Module::NAME_OAUTH2 => [
516 48
                    'className' => \Zemit\Modules\Oauth2\Module::class,
517 48
                    'path' => CORE_PATH . 'Modules/Oauth2/Module.php',
518 48
                ],
519 48
                \Zemit\Cli\Module::NAME_CLI => [
520 48
                    'className' => \Zemit\Modules\Cli\Module::class,
521 48
                    'path' => CORE_PATH . 'Modules/Cli/Module.php',
522 48
                ],
523 48
            ],
524
            
525
            /**
526
             * Default router settings
527
             */
528 48
            'router' => [
529 48
                'hostnames' => [],
530 48
                'defaults' => [
531 48
                    'namespace' => Env::get('ROUTER_DEFAULT_NAMESPACE', 'Zemit\\Modules\\Frontend\\Controllers'),
532 48
                    'module' => Env::get('ROUTER_DEFAULT_MODULE', 'frontend'),
533 48
                    'controller' => Env::get('ROUTER_DEFAULT_CONTROLLER', 'index'),
534 48
                    'action' => Env::get('ROUTER_DEFAULT_ACTION', 'index'),
535 48
                ],
536 48
                'cli' => [
537 48
                    'namespace' => Env::get('ROUTER_CLI_DEFAULT_NAMESPACE', 'Zemit\\Modules\\Cli\\Tasks'),
538 48
                    'module' => Env::get('ROUTER_CLI_DEFAULT_MODULE', 'cli'),
539 48
                    'task' => Env::get('ROUTER_CLI_DEFAULT_TASK', 'help'),
540 48
                    'action' => Env::get('ROUTER_CLI_DEFAULT_ACTION', 'main'),
541 48
                ],
542 48
                'notFound' => [
543 48
                    'namespace' => Env::get('ROUTER_NOTFOUND_NAMESPACE', ''),
544 48
                    'module' => Env::get('ROUTER_NOTFOUND_MODULE', ''),
545 48
                    'controller' => Env::get('ROUTER_NOTFOUND_CONTROLLER', 'error'),
546 48
                    'task' => Env::get('ROUTER_NOTFOUND_TASK', 'error'),
547 48
                    'action' => Env::get('ROUTER_NOTFOUND_ACTION', 'notFound'),
548 48
                ],
549 48
                'fatal' => [
550 48
                    'namespace' => Env::get('ROUTER_FATAL_NAMESPACE', ''),
551 48
                    'module' => Env::get('ROUTER_FATAL_MODULE', ''),
552 48
                    'controller' => Env::get('ROUTER_FATAL_CONTROLLER', 'error'),
553 48
                    'task' => Env::get('ROUTER_FATAL_TASK', 'error'),
554 48
                    'action' => Env::get('ROUTER_FATAL_ACTION', 'fatal'),
555 48
                ],
556 48
                'forbidden' => [
557 48
                    'namespace' => Env::get('ROUTER_FORBIDDEN_NAMESPACE', ''),
558 48
                    'module' => Env::get('ROUTER_FORBIDDEN_MODULE', ''),
559 48
                    'controller' => Env::get('ROUTER_FORBIDDEN_CONTROLLER', 'error'),
560 48
                    'task' => Env::get('ROUTER_FORBIDDEN_TASK', 'error'),
561 48
                    'action' => Env::get('ROUTER_FORBIDDEN_ACTION', 'forbidden'),
562 48
                ],
563 48
                'unauthorized' => [
564 48
                    'namespace' => Env::get('ROUTER_UNAUTHORIZED_NAMESPACE', ''),
565 48
                    'module' => Env::get('ROUTER_UNAUTHORIZED_MODULE', ''),
566 48
                    'controller' => Env::get('ROUTER_UNAUTHORIZED_CONTROLLER', 'error'),
567 48
                    'task' => Env::get('ROUTER_UNAUTHORIZED_TASK', 'error'),
568 48
                    'action' => Env::get('ROUTER_UNAUTHORIZED_ACTION', 'unauthorized'),
569 48
                ],
570 48
                'maintenance' => [
571 48
                    'namespace' => Env::get('ROUTER_MAINTENANCE_NAMESPACE', ''),
572 48
                    'module' => Env::get('ROUTER_MAINTENANCE_MODULE', ''),
573 48
                    'controller' => Env::get('ROUTER_MAINTENANCE_CONTROLLER', 'error'),
574 48
                    'task' => Env::get('ROUTER_MAINTENANCE_TASK', 'error'),
575 48
                    'action' => Env::get('ROUTER_MAINTENANCE_ACTION', 'maintenance'),
576 48
                ],
577 48
                'error' => [
578 48
                    'namespace' => Env::get('ROUTER_ERROR_NAMESPACE', ''),
579 48
                    'module' => Env::get('ROUTER_ERROR_MODULE', ''),
580 48
                    'controller' => Env::get('ROUTER_ERROR_CONTROLLER', 'error'),
581 48
                    'task' => Env::get('ROUTER_ERROR_TASK', 'error'),
582 48
                    'action' => Env::get('ROUTER_ERROR_ACTION', 'index'),
583 48
                ],
584 48
            ],
585
    
586
            /**
587
             * View Configuration
588
             */
589 48
            'view' => [
590 48
                'minify' => Env::get('VIEW_MINIFY', false),
591 48
                'engines' => Env::get('VIEW_ENGINES', [
592 48
                    '.phtml' => \Phalcon\Mvc\View\Engine\Php::class,
593 48
                    '.volt' => \Phalcon\Mvc\View\Engine\Volt::class,
594 48
//                    '.mhtml' => \Phalcon\Mvc\View\Engine\Mustache::class,
595 48
//                    '.twig' => \Phalcon\Mvc\View\Engine\Twig::class,
596 48
//                    '.tpl' => \Phalcon\Mvc\View\Engine\Smarty::class
597 48
                ]),
598 48
            ],
599
    
600
            /**
601
             * Volt Configuration
602
             */
603 48
            'volt' => [
604 48
                'autoescape' => Env::get('VOLT_AUTOESCAPE', false),
605 48
                'always' => Env::get('VOLT_ALWAYS', false),
606 48
                'extension' => Env::get('VOLT_EXTENSION', '.php'),
607 48
                'separator' => Env::get('VOLT_SEPARATOR', '%%'),
608 48
                'path' => Env::get('VOLT_PATH', './'),
609 48
                'prefix' => Env::get('VOLT_PREFIX', null),
610 48
                'stat' => Env::get('VOLT_STAT', true), // Whether Phalcon must check if there are differences between the template file and its compiled path
611 48
            ],
612
            
613
            /**
614
             * Gravatar Configuration
615
             */
616 48
            'gravatar' => [
617 48
                'default_image' => Env::get('GRAVATAR_DEFAULT_IMAGE', 'identicon'),
618 48
                'size' => Env::get('GRAVATAR_SIZE', 24),
619 48
                'rating' => Env::get('GRAVATAR_RATING', 'pg'),
620 48
                'use_https' => Env::get('GRAVATAR_USE_HTTPS', true),
621 48
            ],
622
            
623
            /**
624
             * reCaptcha Configuration
625
             */
626 48
            'reCaptcha' => [
627 48
                'siteKey' => Env::get('RECAPTCHA_KEY'),
628 48
                'secret' => Env::get('RECAPTCHA_SECRET'),
629 48
                'expectedHostname' => Env::get('RECAPTCHA_EXPECTED_HOSTNAME'),
630 48
                'expectedApkPackageName' => Env::get('RECAPTCHA_EXPECTED_APK_PACKAGE_NAME'),
631 48
                'expectedAction' => Env::get('RECAPTCHA_EXPECTED_ACTION', null),
632 48
                'scoreThreshold' => Env::get('RECAPTCHA_SCORE_THRESHOLD', 0.5),
633 48
            ],
634
            
635
            /**
636
             * Locale Service Settings
637
             */
638 48
            'locale' => [
639 48
                'default' => Env::get('LOCALE_DEFAULT', 'en'),
640 48
                'sessionKey' => Env::get('LOCALE_SESSION_KEY', 'zemit-locale'),
641 48
                'mode' => Env::get('LOCALE_MODE', Locale::MODE_DEFAULT),
642 48
                'allowed' => explode(',', Env::get('LOCALE_ALLOWED', 'en')),
643 48
            ],
644
            
645
            /**
646
             * Translate Service Settings
647
             */
648 48
            'translate' => [
649 48
                'locale' => explode(',', Env::get('TRANSLATE_LOCALE', 'en_US.utf8')),
650 48
                'defaultDomain' => Env::get('TRANSLATE_DEFAULT_DOMAIN', 'messages'),
651 48
                'category' => Env::get('TRANSLATE_CATEGORY', defined('LC_MESSAGES')? LC_MESSAGES : 5),
652 48
                'directory' => [
653 48
                    Env::get('TRANSLATE_DEFAULT_DOMAIN', 'messages') => Env::get('TRANSLATE_DEFAULT_PATH', CORE_PATH . 'Locales'),
654 48
                ],
655 48
            ],
656
            
657
            /**
658
             * Default Session Configuration
659
             */
660 48
            'session' => [
661 48
                'driver' => Env::get('SESSION_DRIVER', 'stream'),
662 48
                'drivers' => [
663 48
                    'stream' => [
664 48
                        'adapter' => Env::get('SESSION_STREAM_ADAPTER', \Phalcon\Session\Adapter\Stream::class),
665 48
                        'savePath' => Env::get('SESSION_STREAM_SAVE_PATH', '/tmp'),
666 48
                    ],
667 48
                    'memcached' => [
668 48
                        'adapter' => Env::get('SESSION_MEMCACHED_ADAPTER', \Phalcon\Session\Adapter\Libmemcached::class),
669 48
                        'servers' => [
670 48
                            [
671 48
                                'host' => Env::get('SESSION_MEMCACHED_HOST', Env::get('MEMCACHED_HOST', '127.0.0.1')),
672 48
                                'port' => Env::get('SESSION_MEMCACHED_PORT', Env::get('MEMCACHED_PORT', 11211)),
673 48
                                'weight' => Env::get('SESSION_MEMCACHED_WEIGHT', Env::get('MEMCACHED_WEIGHT', 100)),
674 48
                            ],
675 48
                        ],
676 48
                        'client' => [],
677 48
                    ],
678 48
                    'redis' => [
679 48
                        'adapter' => Env::get('SESSION_REDIS_ADAPTER', \Phalcon\Session\Adapter\Redis::class),
680 48
                        'defaultSerializer' => Env::get('SESSION_REDIS_DEFAULT_SERIALIZER', Env::get('REDIS_DEFAULT_SERIALIZER', 'php')),
681 48
                        'lifetime' => Env::get('SESSION_REDIS_LIFETIME', Env::get('REDIS_LIFETIME', 3600)),
682 48
                        'serializer' => Env::get('SESSION_REDIS_SERIALIZER', Env::get('REDIS_SERIALIZER', null)),
683 48
                        'host' => Env::get('SESSION_REDIS_HOST', Env::get('REDIS_HOST', '127.0.0.1')),
684 48
                        'port' => Env::get('SESSION_REDIS_PORT', Env::get('REDIS_PORT', 6379)),
685 48
                        'index' => Env::get('SESSION_REDIS_INDEX', Env::get('REDIS_INDEX', 1)),
686 48
                        'auth' => Env::get('SESSION_REDIS_AUTH', Env::get('REDIS_AUTH', null)),
687 48
                        'persistent' => Env::get('SESSION_REDIS_PERSISTENT', Env::get('REDIS_PERSISTENT', 0)),
688 48
                        'socket' => Env::get('SESSION_REDIS_SOCKET', Env::get('REDIS_SOCKET', null)),
689 48
                    ],
690 48
                    'noop' => [
691 48
                        'adapter' => Env::get('SESSION_NOOP_ADAPTER', \Phalcon\Session\Adapter\Noop::class),
692 48
                    ],
693 48
                ],
694 48
                'default' => [
695 48
                    'prefix' => Env::get('SESSION_PREFIX', Env::get('GLOBAL_PREFIX', 'zemit_') . 'session_'),
696 48
                    'uniqueId' => Env::get('SESSION_UNIQUE_ID', Env::get('GLOBAL_PREFIX', 'zemit_')),
697 48
                    'lifetime' => Env::get('SESSION_LIFETIME', 3600),
698 48
                ],
699 48
                'ini' => [
700 48
                    'session.save_path' => Env::get('SESSION_SAVE_PATH', ''),
701 48
                    'session.name' => Env::get('SESSION_NAME', 'PHPSESSID'),
702 48
                    'session.save_handler' => Env::get('SESSION_SAVE_HANDLER', 'files'),
703 48
                    'session.auto_start' => Env::get('SESSION_AUTO_START', '0'),
704 48
                    'session.gc_probability' => Env::get('SESSION_GC_PROBABILITY', '1'),
705 48
                    'session.gc_divisor' => Env::get('SESSION_GC_DIVISOR', '100'),
706 48
                    'session.gc_maxlifetime' => Env::get('SESSION_GC_MAXLIFETIME', '1440'),
707 48
                    'session.serialize_handler' => Env::get('SESSION_SERIALIZE_HANDLER', 'php'),
708 48
                    'session.cookie_lifetime' => Env::get('SESSION_COOKIE_LIFETIME', '0'),
709 48
                    'session.cookie_path' => Env::get('SESSION_COOKIE_PATH', '/'),
710 48
                    'session.cookie_domain' => Env::get('SESSION_COOKIE_DOMAIN', ''),
711 48
                    'session.cookie_secure' => Env::get('SESSION_COOKIE_SECURE', '1'),
712 48
                    'session.cookie_httponly' => Env::get('SESSION_COOKIE_HTTPONLY', '1'),
713 48
                    'session.cookie_samesite' => Env::get('SESSION_COOKIE_SAMESITE', ''),
714 48
                    'session.use_strict_mode' => Env::get('SESSION_USE_STRICT_MODE', '0'),
715 48
                    'session.use_cookies' => Env::get('SESSION_USE_COOKIES', '1'),
716 48
                    'session.use_only_cookies' => Env::get('SESSION_USE_ONLY_COOKIES', '1'),
717 48
                    'session.referer_check' => Env::get('SESSION_REFERER_CHECK', ''),
718 48
                    'session.cache_limiter' => Env::get('SESSION_CACHE_LIMITER', 'nocache'),
719 48
                    'session.cache_expire' => Env::get('SESSION_CACHE_EXPIRE', '180'),
720 48
                    'session.use_trans_sid' => Env::get('SESSION_USE_TRANS_SID', '0'),
721 48
                    'session.trans_sid_tags' => Env::get('SESSION_TRANS_SID_TAGS', 'a=href,area=href,frame=src,form='),
722 48
                    'session.trans_sid_hosts' => Env::get('SESSION_TRANS_SID_HOSTS', $_SERVER['HTTP_HOST'] ?? ''),
723 48
                    'session.sid_length' => Env::get('SESSION_SID_LENGTH', '32'),
724 48
                    'session.sid_bits_per_character' => Env::get('SESSION_SID_BITS_PER_CHARACTER', '4'),
725 48
                    'session.upload_progress.enabled' => Env::get('SESSION_UPLOAD_PROGRESS_ENABLED', '1'),
726 48
                    'session.upload_progress.cleanup' => Env::get('SESSION_UPLOAD_PROGRESS_CLEANUP', '1'),
727 48
                    'session.upload_progress.prefix' => Env::get('SESSION_UPLOAD_PROGRESS_PREFIX', Env::get('GLOBAL_PREFIX', 'zemit_') . 'upload_progress_'),
728 48
                    'session.upload_progress.name' => Env::get('SESSION_UPLOAD_PROGRESS_NAME', 'PHP_SESSION_UPLOAD_PROGRESS'),
729 48
                    'session.upload_progress.freq' => Env::get('SESSION_UPLOAD_PROGRESS_FREQ', '1%'),
730 48
                    'session.upload_progress.min_freq' => Env::get('SESSION_UPLOAD_PROGRESS_MIN_FREQ', '1'),
731 48
                    'session.lazy_write' => Env::get('SESSION_LAZY_WRITE', '1'),
732 48
                    'session.hash_function' => Env::get('SESSION_HASH_FUNCTION', '0'),
733 48
                    'session.hash_bits_per_character' => Env::get('SESSION_HASH_BITS_PER_CHARACTER', '4'),
734 48
                    'session.entropy_file' => Env::get('SESSION_ENTROPY_FILE', ''),
735 48
                    'session.entropy_length' => Env::get('SESSION_ENTROPY_LENGTH', '0'),
736 48
                ],
737 48
            ],
738
            
739
            /**
740
             * Default module/plugin structure
741
             */
742 48
            'module' => [
743 48
                'dir' => [
744
                    // default
745 48
                    'modules' => Env::get('MODULE_DIR_MODULES', 'Modules/'),
746 48
                    'controllers' => Env::get('MODULE_DIR_CONTROLLER', 'Controllers/'),
747 48
                    'tasks' => Env::get('MODULE_DIR_TASKS', 'Tasks/'),
748 48
                    'models' => Env::get('MODULE_DIR_MODELS', 'Models/'),
749 48
                    'views' => Env::get('MODULE_DIR_VIEWS', 'Views/'),
750 48
                    'bootstrap' => Env::get('MODULE_DIR_BOOTSTRAP', 'Bootstrap/'),
751 48
                    'locales' => Env::get('MODULE_DIR_LOCALES', 'Locales/'),
752 48
                    'config' => Env::get('MODULE_DIR_CONFIG', 'Config/'),
753
                    
754
                    // private
755 48
                    'migrations' => Env::get('MODULE_DIR_MIGRATION', 'Private/migrations/'),
756 48
                    'cache' => Env::get('MODULE_DIR_MIGRATION', 'Private/migrations/'),
757 48
                    'logs' => Env::get('MODULE_DIR_LOGS', 'Private/migrations/'),
758 48
                    'backups' => Env::get('MODULE_DIR_BACKUPS', 'Private/backups/'),
759 48
                    'files' => Env::get('MODULE_DIR_FILES', 'Private/files/'),
760 48
                    'trash' => Env::get('MODULE_DIR_TRASH', 'Private/trash/'),
761 48
                ],
762 48
            ],
763
            
764
            /**
765
             * Default security settings
766
             */
767 48
            'security' => [ // phalcon security config
768 48
                'workFactor' => Env::get('SECURITY_WORK_FACTOR', 12), // workfactor for the phalcon security service
769 48
                'hash' => Env::get('SECURITY_HASH', Security::CRYPT_ARGON2ID), // set default hash to sha512
770 48
                'salt' => Env::get('SECURITY_SALT', '>mY.Db5fR?k%~<ZWf\}Zh35_IFC]#0Xx'), // salt for the phalcon security service
771 48
                'argon2' => [
772 48
                    'memoryCost' => Env::get('SECURITY_ARGON2_MEMORY_COST', PASSWORD_ARGON2_DEFAULT_MEMORY_COST),
773 48
                    'timeCost' => Env::get('SECURITY_ARGON2_TIME_COST', PASSWORD_ARGON2_DEFAULT_TIME_COST),
774 48
                    'threads' => Env::get('SECURITY_ARGON2_THREADS', PASSWORD_ARGON2_DEFAULT_THREADS),
775 48
                ],
776 48
                'jwt' => [
777 48
                    'signer' => Env::get('SECURITY_JWT_SIGNER', \Phalcon\Encryption\Security\JWT\Signer\Hmac::class),
778 48
                    'algo' => Env::get('SECURITY_JWT_ALGO', 'sha512'),
779 48
                    'contentType' => Env::get('SECURITY_JWT_CONTENT_TYPE', 'application/json'),
780 48
                    'expiration' => $now->modify(Env::get('SECURITY_JWT_EXPIRATION', '+1 day'))->getTimestamp(),
781 48
                    'notBefore' => $now->modify(Env::get('SECURITY_JWT_NOT_BEFORE', '-1 minute'))->getTimestamp(),
782 48
                    'issuedAt' => $now->modify(Env::get('SECURITY_JWT_ISSUED_AT', 'now'))->getTimestamp(),
783 48
                    'issuer' => Env::get('SECURITY_JWT_ISSUER', 'ZEMIT_CORE_DEFAULT_ISSUER'),
784 48
                    'audience' => Env::get('SECURITY_JWT_AUDIENCE', 'ZEMIT_CORE_DEFAULT_AUDIENCE'),
785 48
                    'id' => Env::get('SECURITY_JWT_ID', 'ZEMIT_CORE_DEFAULT_ID'),
786 48
                    'subject' => Env::get('SECURITY_JWT_SUBJECT', 'ZEMIT_CORE_DEFAULT_SUBJECT'),
787 48
                    'passphrase' => Env::get('SECURITY_JWT_PASSPHRASE', 'Tf0PHY/^yDdJs*~)?x#xCNj_N[jW/`c*'),
788 48
                ],
789 48
            ],
790
    
791
            /**
792
             * Default crypt settings
793
             * @todo
794
             */
795 48
            'crypt' => [
796 48
                'cipher' => Env::get('CRYPT_CIPHER', 'aes-256-cfb'),
797 48
                'hash' => Env::get('CRYPT_HASH', 'sha256'),
798 48
                'useSigning' => Env::get('CRYPT_USE_SIGNING', false),
799 48
            ],
800
            
801
            /**
802
             * Cache drivers configs
803
             */
804 48
            'cache' => [
805 48
                'cli' => Env::get('CACHE_DRIVER_CLI', 'memory'),
806 48
                'driver' => Env::get('CACHE_DRIVER', 'memory'),
807 48
                'drivers' => [
808 48
                    'memory' => [
809 48
                        'adapter' => Env::get('CACHE_MEMORY_ADAPTER', \Phalcon\Cache\Adapter\Memory::class),
810 48
                    ],
811 48
                    'apcu' => [
812 48
                        'adapter' => Env::get('CACHE_APCU_ADAPTER', \Phalcon\Cache\Adapter\Apcu::class),
813 48
                    ],
814 48
                    'stream' => [
815 48
                        'adapter' => Env::get('CACHE_STREAM_ADAPTER', \Phalcon\Cache\Adapter\Stream::class),
816 48
                        'cacheDir' => Env::get('CACHE_STREAM_DIR', PRIVATE_PATH . '/cache/data/'),
817 48
                    ],
818 48
                    'memcached' => [
819 48
                        'adapter' => Env::get('CACHE_MEMCACHED_ADAPTER', \Phalcon\Cache\Adapter\Libmemcached::class),
820 48
                        'servers' => [
821 48
                            [
822 48
                                'host' => Env::get('CACHE_MEMCACHED_HOST', Env::get('MEMCACHED_HOST', '127.0.0.1')),
823 48
                                'port' => Env::get('CACHE_MEMCACHED_PORT', Env::get('MEMCACHED_PORT', 11211)),
824 48
                                'weight' => Env::get('CACHE_MEMCACHED_WEIGHT', Env::get('MEMCACHED_WEIGHT', 100)),
825 48
                            ],
826 48
                        ],
827 48
                    ],
828 48
                    'redis' => [
829 48
                        'adapter' => Env::get('CACHE_REDIS_ADAPTER', \Phalcon\Cache\Adapter\Redis::class),
830 48
                        'defaultSerializer' => Env::get('CACHE_REDIS_DEFAULT_SERIALIZER', Env::get('REDIS_DEFAULT_SERIALIZER', 'php')),
831 48
                        'lifetime' => Env::get('CACHE_REDIS_LIFETIME', Env::get('REDIS_LIFETIME', 3600)),
832 48
                        'serializer' => Env::get('CACHE_REDIS_SERIALIZER', Env::get('REDIS_SERIALIZER', null)),
833 48
                        'host' => Env::get('CACHE_REDIS_HOST', Env::get('REDIS_HOST', '127.0.0.1')),
834 48
                        'port' => Env::get('CACHE_REDIS_PORT', Env::get('REDIS_PORT', 6379)),
835 48
                        'index' => Env::get('CACHE_REDIS_INDEX', Env::get('REDIS_INDEX', 1)),
836 48
                        'auth' => Env::get('CACHE_REDIS_AUTH', Env::get('REDIS_AUTH', null)),
837 48
                        'persistent' => Env::get('CACHE_REDIS_PERSISTENT', Env::get('REDIS_PERSISTENT', null)),
838 48
                        'socket' => Env::get('CACHE_REDIS_SOCKET', Env::get('REDIS_SOCKET', null)),
839 48
                    ],
840 48
                ],
841 48
                'default' => [
842 48
                    'prefix' => Env::get('CACHE_PREFIX', Env::get('GLOBAL_PREFIX', 'zemit_') . 'cache_'),
843 48
                    'lifetime' => Env::get('CACHE_LIFETIME', 86400),
844 48
                    'defaultSerializer' => Env::get('CACHE_DEFAULT_SERIALIZER', 'Php'),
845 48
                ],
846 48
            ],
847
            
848
            /**
849
             * Metadata Configuration
850
             */
851 48
            'metadata' => [
852 48
                'driverCli' => Env::get('METADATA_DRIVER_CLI', 'memory'),
853 48
                'driver' => Env::get('METADATA_DRIVER', 'memory'),
854 48
                'drivers' => [
855 48
                    'apcu' => [
856 48
                        'adapter' => Env::get('METADATA_APCU_ADAPTER', \Phalcon\Mvc\Model\MetaData\Apcu::class),
857 48
                    ],
858 48
                    'memory' => [
859 48
                        'adapter' => Env::get('METADATA_MEMORY_ADAPTER', \Phalcon\Mvc\Model\MetaData\Memory::class),
860 48
                    ],
861 48
                    'stream' => [
862 48
                        'adapter' => Env::get('METADATA_STREAM_ADAPTER', \Phalcon\Mvc\Model\MetaData\Stream::class),
863 48
                        'metaDataDir' => Env::get('METADATA_STREAM_DIR', PRIVATE_PATH . '/cache/metadata/'),
864 48
                    ],
865 48
                    'memcached' => [
866 48
                        'adapter' => Env::get('METADATA_MEMCACHED_ADAPTER', \Phalcon\Mvc\Model\MetaData\Libmemcached::class),
867 48
                        'servers' => [
868 48
                            [
869 48
                                'host' => Env::get('METADATA_MEMCACHED_HOST', Env::get('MEMCACHED_HOST', '127.0.0.1')),
870 48
                                'port' => Env::get('METADATA_MEMCACHED_PORT', Env::get('MEMCACHED_PORT', 11211)),
871 48
                                'weight' => Env::get('METADATA_MEMCACHED_WEIGHT', Env::get('MEMCACHED_WEIGHT', 100)),
872 48
                            ],
873 48
                        ],
874 48
                    ],
875 48
                    'redis' => [
876 48
                        'adapter' => Env::get('METADATA_REDIS_ADAPTER', \Phalcon\Mvc\Model\MetaData\Redis::class),
877 48
                        'defaultSerializer' => Env::get('METADATA_REDIS_DEFAULT_SERIALIZER', Env::get('REDIS_DEFAULT_SERIALIZER', 'php')),
878 48
                        'lifetime' => Env::get('METADATA_REDIS_LIFETIME', Env::get('REDIS_LIFETIME', 3600)),
879 48
                        'serializer' => Env::get('METADATA_REDIS_SERIALIZER', Env::get('REDIS_SERIALIZER', null)),
880 48
                        'host' => Env::get('METADATA_REDIS_HOST', Env::get('REDIS_HOST', '127.0.0.1')),
881 48
                        'port' => Env::get('METADATA_REDIS_PORT', Env::get('REDIS_PORT', 6379)),
882 48
                        'index' => Env::get('METADATA_REDIS_INDEX', Env::get('REDIS_INDEX', 1)),
883 48
                        'auth' => Env::get('METADATA_REDIS_AUTH', Env::get('REDIS_AUTH', null)),
884 48
                        'persistent' => Env::get('METADATA_REDIS_PERSISTENT', Env::get('REDIS_PERSISTENT', null)),
885 48
                        'socket' => Env::get('METADATA_REDIS_SOCKET', Env::get('REDIS_SOCKET', null)),
886 48
                    ],
887 48
                    'wincache' => [
888 48
                        'adapter' => Env::get('METADATA_WINCACHE_ADAPTER', \Phalcon\Mvc\Model\MetaData\Wincache::class),
0 ignored issues
show
Bug introduced by
The type Phalcon\Mvc\Model\MetaData\Wincache was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
889 48
                    ],
890 48
                ],
891 48
                'default' => [
892 48
                    'lifetime' => Env::get('METADATA_LIFETIME', 172800),
893 48
                    'prefix' => Env::get('METADATA_PREFIX', Env::get('GLOBAL_PREFIX', 'zemit_') . 'metadata_'),
894 48
                ],
895 48
            ],
896
            
897
            /**
898
             * Annotations Configuration
899
             * - Memory
900
             * - Apcu
901
             * - Stream
902
             * - Memcached
903
             * - Redis
904
             * - Aerospike
905
             */
906 48
            'annotations' => [
907 48
                'driver' => Env::get('ANNOTATIONS_DRIVER', 'memory'),
908 48
                'drivers' => [
909 48
                    'memory' => [
910 48
                        'adapter' => Env::get('ANNOTATIONS_MEMORY_ADAPTER', \Phalcon\Annotations\Adapter\Memory::class),
911 48
                    ],
912 48
                    'apcu' => [
913 48
                        'adapter' => Env::get('ANNOTATIONS_APCU_ADAPTER', \Phalcon\Annotations\Adapter\Apcu::class),
914 48
                    ],
915 48
                    'file' => [
916 48
                        'adapter' => Env::get('ANNOTATIONS_STREAM_ADAPTER', \Phalcon\Annotations\Adapter\Stream::class),
917 48
                        'annotationsDir' => Env::get('ANNOTATIONS_STREAM_DIR', PRIVATE_PATH . '/cache/annotations'),
918 48
                    ],
919 48
                    'memcached' => [
920 48
                        'adapter' => Env::get('ANNOTATIONS_MEMCACHED_ADAPTER', \Phalcon\Annotations\Adapter\Memcached::class),
0 ignored issues
show
Bug introduced by
The type Phalcon\Annotations\Adapter\Memcached was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
921 48
                        'servers' => [
922 48
                            [
923 48
                                'host' => Env::get('ANNOTATIONS_MEMCACHED_HOST', Env::get('MEMCACHED_HOST', '127.0.0.1')),
924 48
                                'port' => Env::get('ANNOTATIONS_MEMCACHED_PORT', Env::get('MEMCACHED_PORT', 11211)),
925 48
                                'weight' => Env::get('ANNOTATIONS_MEMCACHED_WEIGHT', Env::get('MEMCACHED_WEIGHT', 100)),
926 48
                            ],
927 48
                        ],
928 48
                    ],
929 48
                    'redis' => [
930 48
                        'adapter' => Env::get('ANNOTATIONS_REDIS_ADAPTER', \Phalcon\Annotations\Adapter\Redis::class),
0 ignored issues
show
Bug introduced by
The type Phalcon\Annotations\Adapter\Redis was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
931 48
                        'defaultSerializer' => Env::get('ANNOTATIONS_REDIS_DEFAULT_SERIALIZER', Env::get('REDIS_DEFAULT_SERIALIZER', 'php')),
932 48
                        'lifetime' => Env::get('ANNOTATIONS_REDIS_LIFETIME', Env::get('REDIS_LIFETIME', 3600)),
933 48
                        'serializer' => Env::get('ANNOTATIONS_REDIS_SERIALIZER', Env::get('REDIS_SERIALIZER', null)),
934 48
                        'host' => Env::get('ANNOTATIONS_REDIS_HOST', Env::get('REDIS_HOST', '127.0.0.1')),
935 48
                        'port' => Env::get('ANNOTATIONS_REDIS_PORT', Env::get('REDIS_PORT', 6379)),
936 48
                        'index' => Env::get('ANNOTATIONS_REDIS_INDEX', Env::get('REDIS_INDEX', 1)),
937 48
                        'auth' => Env::get('ANNOTATIONS_REDIS_AUTH', Env::get('REDIS_AUTH', null)),
938 48
                        'persistent' => Env::get('ANNOTATIONS_REDIS_PERSISTENT', Env::get('REDIS_PERSISTENT', null)),
939 48
                        'socket' => Env::get('ANNOTATIONS_REDIS_SOCKET', Env::get('REDIS_SOCKET', null)),
940 48
                    ],
941 48
                    'aerospike' => [
942 48
                        'adapter' => Env::get('ANNOTATIONS_AEROSPIKE_ADAPTER', \Phalcon\Annotations\Adapter\Aerospike::class),
0 ignored issues
show
Bug introduced by
The type Phalcon\Annotations\Adapter\Aerospike was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
943 48
                    ],
944 48
                ],
945 48
                'default' => [
946 48
                    'prefix' => Env::get('ANNOTATIONS_PREFIX', Env::get('GLOBAL_PREFIX', 'zemit_') . 'annotations_'),
947 48
                    'lifetime' => Env::get('ANNOTATIONS_LIFETIME', 86400),
948 48
                ],
949 48
            ],
950
            
951
            /**
952
             * Database configuration
953
             */
954 48
            'database' => [
955 48
                'default' => Env::get('DATABASE_ADAPTER', 'mysql'),
956 48
                'drivers' => [
957 48
                    'mysql' => [
958 48
                        'adapter' => Env::get('DATABASE_MYSQL_ADAPTER', \Zemit\Db\Adapter\Pdo\Mysql::class),
959 48
                        'dialectClass' => Env::get('DATABASE_DIALECT_CLASS', \Zemit\Db\Dialect\Mysql::class),
960 48
                        'host' => Env::get('DATABASE_HOST', 'localhost'),
961 48
                        'port' => Env::get('DATABASE_PORT', 3306),
962 48
                        'dbname' => Env::get('DATABASE_DBNAME', ''),
963 48
                        'username' => Env::get('DATABASE_USERNAME', 'root'),
964 48
                        'password' => Env::get('DATABASE_PASSWORD', ''),
965 48
                        'charset' => Env::get('DATABASE_CHARSET', 'utf8'),
966 48
                        'options' => [
967 48
                            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES ' . Env::get('DATABASE_CHARSET', 'utf8') .
968 48
                            ', sql_mode = \'' . Env::get('DATABASE_SQL_MODE', 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION') . '\'',
969 48
                            PDO::ATTR_EMULATE_PREPARES => Env::get('DATABASE_PDO_EMULATE_PREPARES', false), // https://stackoverflow.com/questions/10113562/pdo-mysql-use-pdoattr-emulate-prepares-or-not
970 48
                            PDO::ATTR_STRINGIFY_FETCHES => Env::get('DATABASE_PDO_STRINGIFY_FETCHES', false),
971 48
                            PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => Env::get('MYSQL_ATTR_SSL_VERIFY_SERVER_CERT', true),
972 48
                            PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => Env::get('MYSQL_ATTR_USE_BUFFERED_QUERY', true),
973 48
                        ],
974
                        /**
975
                         * Readonly Configuration
976
                         */
977 48
                        'readonly' => [
978 48
                            'enable' => Env::get('DATABASE_READONLY_ENABLE', false),
979 48
                            'host' => Env::get('DATABASE_READONLY_HOST'),
980 48
                            'port' => Env::get('DATABASE_READONLY_PORT'),
981 48
                            'dbname' => Env::get('DATABASE_READONLY_DBNAME'),
982 48
                            'username' => Env::get('DATABASE_READONLY_USERNAME'),
983 48
                            'password' => Env::get('DATABASE_READONLY_PASSWORD'),
984 48
                            'charset' => Env::get('DATABASE_READONLY_CHARSET'),
985 48
                        ],
986 48
                    ],
987 48
                ],
988 48
            ],
989
            
990
            /**
991
             * Mailer configuration
992
             */
993 48
            'mailer' => [
994 48
                'driver' => Env::get('MAILER_DRIVER', 'sendmail'),
995 48
                'drivers' => [
996 48
                    'mail' => [
997 48
                        'driver' => 'mail',
998 48
                    ],
999 48
                    'sendmail' => [
1000 48
                        'driver' => 'sendmail',
1001 48
                        'sendmail' => Env::get('MAILER_SENDMAIL', '/usr/sbin/sendmail -bs'),
1002 48
                    ],
1003 48
                    'smtp' => [
1004 48
                        'driver' => 'smtp',
1005 48
                        'host' => Env::get('MAILER_SMTP_HOST', 'localhost'),
1006 48
                        'port' => Env::get('MAILER_SMTP_PORT', 25),
1007 48
                        'encryption' => Env::get('MAILER_SMTP_ENCRYPTION', ''),
1008 48
                        'username' => Env::get('MAILER_SMTP_USERNAME', ''),
1009 48
                        'password' => Env::get('MAILER_SMTP_PASSWORD', ''),
1010 48
                    ],
1011 48
                ],
1012 48
                'default' => [
1013 48
                    'charset' => Env::get('MAILER_CHARSET', 'utf-8'),
1014 48
                    'viewsDir' => Env::get('MAILER_VIEWS_DIR', APP_PATH . '/Modules/Frontend/Views/'),
1015 48
                    'baseUri' => Env::get('MAILER_BASE_URI', null),
1016 48
                ],
1017 48
                'from' => [
1018 48
                    'email' => Env::get('MAILER_FROM_EMAIL', 'zemit@localhost'),
1019 48
                    'name' => Env::get('MAILER_FROM_NAME', 'Zemit'),
1020 48
                ],
1021 48
                'to' => [...explode(',', Env::get('MAILER_TO_EMAIL', ''))],
1022 48
                'cc' => [...explode(',', Env::get('MAILER_CC_EMAIL', ''))],
1023 48
                'bcc' => [...explode(',', Env::get('MAILER_BCC_EMAIL', ''))],
1024 48
            ],
1025
            
1026
            /**
1027
             * FileSystem
1028
             * https://flysystem.thephpleague.com/docs/
1029
             */
1030 48
            'fileSystem' => [
1031 48
                'driver' => Env::get('FILE_SYSTEM_DRIVER', 'local'),
1032 48
                'drivers' => [
1033 48
                    'local' => [
1034 48
                        'rootDirectory' => Env::get('FILE_SYSTEM_LOCAL_ROOT_DIRECTORY', ROOT_PATH)
1035 48
                    ],
1036 48
                    'ftp' => [
1037 48
                        'host' => Env::get('FILE_SYSTEM_FTP_HOST'), // required
1038 48
                        'root' => Env::get('FILE_SYSTEM_FTP_ROOT'), // required
1039 48
                        'username' => Env::get('FILE_SYSTEM_FTP_USERNAME'), // required
1040 48
                        'password' => Env::get('FILE_SYSTEM_FTP_PASSWORD'), // required
1041 48
                        'port' => Env::get('FILE_SYSTEM_FTP_PORT', 21),
1042 48
                        'ssl' => Env::get('FILE_SYSTEM_FTP_SSL', false),
1043 48
                        'timeout' => Env::get('FILE_SYSTEM_FTP_TIMEOUT', 10),
1044 48
                        'utf8' => Env::get('FILE_SYSTEM_FTP_UTF8', false),
1045 48
                        'passive' => Env::get('FILE_SYSTEM_FTP_PASSIVE', true),
1046 48
                        'transferMode' => Env::get('FILE_SYSTEM_FTP_TRANSFER_MODE', defined('FTP_BINARY')? FTP_BINARY : 2),
1047 48
                        'systemType' => Env::get('FILE_SYSTEM_FTP_SYSTEM_TYPE'), // windows or unix
1048 48
                        'ignorePassiveAddress' => Env::get('FILE_SYSTEM_FTP_SYSTEM_IGNORE_PASSIVE_ADDRESS'), // true or false
1049 48
                        'timestampsOnUnixListingsEnabled' => Env::get('FILE_SYSTEM_FTP_TIMESTAMPS_ON_UNIX_LISTING_ENABLED', false), // true or false
1050 48
                        'recurseManually' => Env::get('FILE_SYSTEM_FTP_RECURSE_MANUALLY', true), // true or false
1051 48
                    ],
1052 48
                    'sftp' => [
1053 48
                        'host' => Env::get('FILE_SYSTEM_SFTP_HOST'), // required
1054 48
                        'username' => Env::get('FILE_SYSTEM_SFTP_USERNAME'), // required
1055 48
                        'password' => Env::get('FILE_SYSTEM_SFTP_PASSWORD'), // set to null if privateKey is used
1056 48
                        'privateKey' => Env::get('FILE_SYSTEM_SFTP_PRIVATE_KEY'), // can be used instead of password, set to null if password is set
1057 48
                        'passphrase' => Env::get('FILE_SYSTEM_SFTP_PASSPHRASE'), //  set to null if privateKey is not used or has no passphrase
1058 48
                        'port' => Env::get('FILE_SYSTEM_SFTP_PORT', 22),
1059 48
                        'useAgent' => Env::get('FILE_SYSTEM_SFTP_USE_AGENT', false),
1060 48
                        'timeout' => Env::get('FILE_SYSTEM_SFTP_TIMEOUT', 10),
1061 48
                        'maxTries' => Env::get('FILE_SYSTEM_SFTP_MAX_TRIES', 4),
1062 48
                        'hostFingerprint' => Env::get('FILE_SYSTEM_SFTP_HOST_FINGERPRINT'),
1063 48
                        'connectivityChecker' => Env::get('FILE_SYSTEM_SFTP_CONNECTIVITY_CHECKER'),
1064 48
                    ],
1065 48
                    'memory' => [
1066 48
                        // nothing
1067 48
                    ],
1068 48
                    'readOnly' => [
1069 48
                        // nothing
1070 48
                    ],
1071 48
                    'awsS3' => [
1072 48
                        'bucketName' => Env::get('FILE_SYSTEM_AWS_S3_BUCKET_NAME'),
1073 48
                        'pathPrefix' => Env::get('FILE_SYSTEM_AWS_S3_PATH_PREFIX')
1074 48
                    ],
1075 48
                    'googleCloudStorage' => [
1076 48
                        'bucketName' => Env::get('FILE_SYSTEM_GOOGLE_CLOUD_STORAGE_BUCKET_NAME'),
1077 48
                        'pathPrefix' => Env::get('FILE_SYSTEM_GOOGLE_CLOUD_STORAGE_PATH_PREFIX')
1078 48
                    ],
1079 48
                    'azureBlobStorage' => [
1080 48
                        'containerName' => Env::get('FILE_SYSTEM_AZURE_BLOB_STORAGE_CONTAINER_NAME'),
1081 48
                        'pathPrefix' => Env::get('FILE_SYSTEM_AZURE_BLOB_STORAGE_PATH_PREFIX')
1082 48
                    ],
1083 48
                    'webdav' => [
1084 48
                        'baseUri' => Env::get('FILE_SYSTEM_WEBDAV_BASE_URI'),
1085 48
                        'userName' => Env::get('FILE_SYSTEM_WEBDAV_USERNAME'),
1086 48
                        'password' => Env::get('FILE_SYSTEM_WEBDAV_PASSWORD'),
1087 48
                    ],
1088 48
                    'zipArchive' => [
1089 48
                        'path' => Env::get('FILE_SYSTEM_ZIP_ARCHIVE_PATH')
1090 48
                    ],
1091 48
                ],
1092 48
            ],
1093
            
1094
            /**
1095
             * Cookies
1096
             */
1097 48
            'cookies' => [
1098 48
                'useEncryption' => Env::get('COOKIES_USE_ENCRYPTION', true),
1099 48
                'signKey' => Env::get('COOKIES_SIGN_KEY', ''),
1100 48
            ],
1101
            
1102
            /**
1103
             * AWS - Amazon Web Service
1104
             */
1105 48
            'aws' => [
1106 48
                'region' => Env::get('AWS_REGION', 'ca-central-1'),
1107 48
                'version' => Env::get('AWS_VERSION', 'latest'),
1108 48
                'credentials' => [
1109 48
                    'key' => Env::get('AWS_CREDENTIALS_KEY', ''),
1110 48
                    'secret' => Env::get('AWS_CREDENTIALS_SECRET', ''),
1111 48
                ],
1112 48
            ],
1113
    
1114
            /**
1115
             * Facebook SDK
1116
             */
1117 48
            'facebook' => [
1118
            
1119 48
            ],
1120
            
1121
            /**
1122
             * Oauth2
1123
             */
1124 48
            'oauth2' => [
1125 48
                'client' => [
1126 48
                    'clientId' => Env::get('OAUTH2_CLIENT_ID'),
1127 48
                    'clientSecret' => Env::get('OAUTH2_CLIENT_SECRET'),
1128 48
                    'redirectUri' => Env::get('OAUTH2_CLIENT_REDIRECT_URI', '/oauth2/client/redirect'),
1129 48
                    'urlAuthorize' => Env::get('OAUTH2_CLIENT_URL_AUTHORIZE', '/oauth2/client/authorize'),
1130 48
                    'urlAccessToken' => Env::get('OAUTH2_CLIENT_URL_ACCESS_TOKEN', '/oauth2/client/token'),
1131 48
                    'urlResourceOwnerDetails' => Env::get('OAUTH2_CLIENT_URL_RESOURCE', '/oauth2/client/resource'),
1132 48
                    'proxy' => Env::get('OAUTH2_CLIENT_PROXY', null),
1133 48
                    'verify' => Env::get('OAUTH2_CLIENT_VERIFY', true),
1134 48
                ],
1135 48
                'facebook' => [
1136 48
                    'clientId' => Env::get('OAUTH2_FACEBOOK_CLIENT_ID'),
1137 48
                    'clientSecret' => Env::get('OAUTH2_FACEBOOK_CLIENT_SECRET'),
1138 48
                    'redirectUri' => Env::get('OAUTH2_FACEBOOK_CLIENT_REDIRECT_URI', '/oauth2/facebook/callback'),
1139 48
                    'graphApiVersion' => Env::get('OAUTH2_FACEBOOK_GRAPH_API_VERSION', 'v2.10'),
1140 48
                ],
1141 48
                'google' => [
1142 48
                    'clientId' => Env::get('OAUTH2_GOOGLE_CLIENT_ID'),
1143 48
                    'clientSecret' => Env::get('OAUTH2_GOOGLE_CLIENT_SECRET'),
1144 48
                    'redirectUri' => Env::get('OAUTH2_GOOGLE_CLIENT_REDIRECT_URI', '/oauth2/google/callback'),
1145 48
                    'hostedDomain' => Env::get('OAUTH2_GOOGLE_CLIENT_HOSTED_DOMAIN', null), // optional; used to restrict access to users on your G Suite/Google Apps for Business accounts
1146 48
                ],
1147 48
                'instagram' => [
1148
                
1149 48
                ],
1150 48
                'linked' => [
1151
                
1152 48
                ],
1153 48
                'twitter' => [
1154
                
1155 48
                ],
1156 48
                'github' => [
1157
                
1158 48
                ],
1159 48
                'apple' => [
1160
                
1161 48
                ],
1162 48
            ],
1163
            
1164 48
            'openai' => [
1165 48
                'secretKey' => Env::get('OPENAI_SECRET_KEY'),
1166 48
                'organizationId' => Env::get('OPENAI_ORGANIZATION_ID'),
1167 48
            ],
1168
            
1169
            /**
1170
             * Imap
1171
             * https://packagist.org/packages/php-imap/php-imap
1172
             */
1173 48
            'imap' => [
1174 48
                'path' => Env::get('IMAP_PATH'), // IMAP server and mailbox folder
1175 48
                'login' => Env::get('IMAP_LOGIN'), // Username for the before configured mailbox
1176 48
                'password' => Env::get('IMAP_PASSWORD'), // Password for the before configured username
1177 48
                'attachmentsDir' => Env::get('IMAP_ATTACHMENTS_DIR'), // Server encoding (optional)
1178 48
                'serverEncoding' => Env::get('IMAP_SERVER_ENCODING', 'UTF-8'), // Directory, where attachments will be saved (optional)
1179 48
                'trimImapPath' => Env::get('IMAP_TRIM_IMAP_PATH', true),   // Trim leading/ending whitespaces of IMAP path (optional)
1180 48
                'attachmentFilenameMode' => Env::get('IMAP_ATTACHMENT_FILENAME_MODE', false), // Attachment filename mode (optional; false = random filename; true = original filename)
1181 48
            ],
1182
            
1183 48
            'clamav' => [
1184 48
                'address' => Env::get('CLAMAV_ADDRESS', 'unix:///run/clamd.scan/clamd.sock'),
1185 48
                'timeout' => Env::get('CLAMAV_TIMEOUT', 30),
1186 48
            ],
1187
            
1188
            /**
1189
             * Dotenv
1190
             */
1191 48
            'dotenv' => [
1192 48
                'filePath' => '',
1193 48
            ],
1194
            
1195
            /**
1196
             * Client config to pass to front-end
1197
             */
1198 48
            'client' => [],
1199
            
1200
            /**
1201
             * Application permissions
1202
             */
1203 48
            'permissions' => [
1204
                
1205
                /**
1206
                 * Feature permissions
1207
                 */
1208 48
                'features' => [
1209
                    
1210 48
                    'test' => [
1211 48
                        'components' => [
1212 48
                            Api\Controllers\TestController::class => ['*'],
1213 48
                        ],
1214 48
                    ],
1215
                    
1216 48
                    'base' => [
1217 48
                        'components' => [
1218 48
                            Api\Controllers\AuthController::class => ['get'],
1219 48
                            Models\Audit::class => ['create'],
1220 48
                            Models\AuditDetail::class => ['create'],
1221 48
                            Models\Session::class => ['*'],
1222 48
                        ],
1223 48
                    ],
1224
                    
1225 48
                    'login' => [
1226 48
                        'components' => [
1227 48
                            Api\Controllers\AuthController::class => ['login'],
1228 48
                            Models\User::class => ['find'],
1229 48
                        ],
1230 48
                    ],
1231
                    
1232 48
                    'logout' => [
1233 48
                        'components' => [
1234 48
                            Api\Controllers\AuthController::class => ['logout'],
1235 48
                        ],
1236 48
                    ],
1237
                    
1238 48
                    'register' => [
1239 48
                        'components' => [
1240 48
                            Api\Controllers\AuthController::class => ['register'],
1241 48
                            Models\User::class => ['find', 'create'],
1242 48
                        ],
1243 48
                    ],
1244
                    
1245 48
                    'cron' => [
1246 48
                        'components' => [
1247 48
                            Cli\Tasks\CronTask::class => ['*'],
1248 48
                        ],
1249 48
                    ],
1250
                    
1251 48
                    'manageRoleList' => [
1252 48
                        'components' => [
1253 48
                            Api\Controllers\RoleController::class => ['*'],
1254 48
                            Models\Role::class => ['*'],
1255 48
                            Models\UserRole::class => ['*'],
1256 48
                        ],
1257 48
                        'behaviors' => [
1258 48
                            Api\Controllers\RoleController::class => [
1259 48
                                Behavior\Skip\SkipIdentityCondition::class,
1260 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1261 48
                            ],
1262 48
                        ],
1263 48
                    ],
1264
                    
1265 48
                    'manageGroupList' => [
1266 48
                        'components' => [
1267 48
                            Api\Controllers\GroupController::class => ['*'],
1268 48
                            Models\Group::class => ['*'],
1269 48
                        ],
1270 48
                        'behaviors' => [
1271 48
                            Api\Controllers\GroupController::class => [
1272 48
                                Behavior\Skip\SkipIdentityCondition::class,
1273 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1274 48
                            ],
1275 48
                        ],
1276 48
                    ],
1277
                    
1278 48
                    'manageTypeList' => [
1279 48
                        'components' => [
1280 48
                            Api\Controllers\TypeController::class => ['*'],
1281 48
                            Models\Group::class => ['*'],
1282 48
                        ],
1283 48
                        'behaviors' => [
1284 48
                            Api\Controllers\TypeController::class => [
1285 48
                                Behavior\Skip\SkipIdentityCondition::class,
1286 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1287 48
                            ],
1288 48
                        ],
1289 48
                    ],
1290
                    
1291 48
                    'manageLangList' => [
1292 48
                        'components' => [
1293 48
                            Api\Controllers\LangController::class => ['*'],
1294 48
                            Models\Lang::class => ['*'],
1295 48
                        ],
1296 48
                        'behaviors' => [
1297 48
                            Api\Controllers\LangController::class => [
1298 48
                                Behavior\Skip\SkipIdentityCondition::class,
1299 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1300 48
                            ],
1301 48
                        ],
1302 48
                    ],
1303
                    
1304 48
                    'manageUserList' => [
1305 48
                        'components' => [
1306 48
                            Api\Controllers\UserController::class => ['*'],
1307 48
                            Models\User::class => ['*'],
1308 48
                        ],
1309 48
                        'behaviors' => [
1310 48
                            Api\Controllers\UserController::class => [
1311 48
                                Behavior\Skip\SkipIdentityCondition::class,
1312 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1313 48
                            ],
1314 48
                        ],
1315 48
                    ],
1316
                    
1317 48
                    'manageTemplateList' => [
1318 48
                        'components' => [
1319 48
                            Api\Controllers\TemplateController::class => ['*'],
1320 48
                            Models\Template::class => ['*'],
1321 48
                        ],
1322 48
                        'behaviors' => [
1323 48
                            Api\Controllers\TemplateController::class => [
1324 48
                                Behavior\Skip\SkipIdentityCondition::class,
1325 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1326 48
                            ],
1327 48
                        ],
1328 48
                    ],
1329
                    
1330 48
                    'manageAuditList' => [
1331 48
                        'components' => [
1332 48
                            Api\Controllers\AuditController::class => ['*'],
1333 48
                            Models\Audit::class => ['*'],
1334 48
                        ],
1335 48
                        'behaviors' => [
1336 48
                            Api\Controllers\AuditController::class => [
1337 48
                                Behavior\Skip\SkipIdentityCondition::class,
1338 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1339 48
                            ],
1340 48
                        ],
1341 48
                    ],
1342
                    
1343 48
                    'manageSiteList' => [
1344 48
                        'components' => [
1345 48
                            Api\Controllers\WorkspaceController::class => ['*'],
1346 48
                            Models\Workspace::class => ['*'],
1347 48
                            Models\WorkspaceLang::class => ['*'],
1348 48
                        ],
1349 48
                        'behaviors' => [
1350 48
                            Api\Controllers\WorkspaceController::class => [
1351 48
                                Behavior\Skip\SkipIdentityCondition::class,
1352 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1353 48
                            ],
1354 48
                        ],
1355 48
                    ],
1356
                    
1357 48
                    'managePageList' => [
1358 48
                        'components' => [
1359 48
                            Api\Controllers\PageController::class => ['*'],
1360 48
                            Models\Page::class => ['*'],
1361 48
                        ],
1362 48
                        'behaviors' => [
1363 48
                            Api\Controllers\PageController::class => [
1364 48
                                Behavior\Skip\SkipIdentityCondition::class,
1365 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1366 48
                            ],
1367 48
                        ],
1368 48
                    ],
1369
                    
1370 48
                    'managePostList' => [
1371 48
                        'components' => [
1372 48
                            Api\Controllers\PostController::class => ['*'],
1373 48
                            Models\Post::class => ['*'],
1374 48
                        ],
1375 48
                        'behaviors' => [
1376 48
                            Api\Controllers\PostController::class => [
1377 48
                                Behavior\Skip\SkipIdentityCondition::class,
1378 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1379 48
                            ],
1380 48
                        ],
1381 48
                    ],
1382
                    
1383 48
                    'managePhalconMigrationsList' => [
1384 48
                        'components' => [
1385 48
                            Api\Controllers\PhalconMigrationsController::class => ['*'],
1386 48
                            Models\PhalconMigrations::class => ['*'],
1387 48
                        ],
1388 48
                        'behaviors' => [
1389 48
                            Api\Controllers\PhalconMigrationsController::class => [
1390 48
                                Behavior\Skip\SkipIdentityCondition::class,
1391 48
                                Behavior\Skip\SkipSoftDeleteCondition::class,
1392 48
                            ],
1393 48
                        ],
1394 48
                    ],
1395 48
                ],
1396
                
1397
                /**
1398
                 * Roles permissions
1399
                 */
1400 48
                'roles' => [
1401
                    
1402
                    // Console (CLI)
1403 48
                    'cli' => [
1404 48
                        'components' => [
1405 48
                            Cli\Tasks\BuildTask::class => ['*'],
1406 48
                            Cli\Tasks\CacheTask::class => ['*'],
1407 48
                            Cli\Tasks\CronTask::class => ['*'],
1408 48
                            Cli\Tasks\ErrorTask::class => ['*'],
1409 48
                            Cli\Tasks\DatabaseTask::class => ['*'],
1410 48
                            Cli\Tasks\DataLifeCycleTask::class => ['*'],
1411 48
                            Cli\Tasks\HelpTask::class => ['*'],
1412 48
                            Cli\Tasks\ScaffoldTask::class => ['*'],
1413 48
                            Cli\Tasks\TestTask::class => ['*'],
1414 48
                            Cli\Tasks\UserTask::class => ['*'],
1415 48
                        ],
1416 48
                    ],
1417
                    
1418
                    // Everyone with or without role
1419 48
                    'everyone' => [
1420 48
                        'features' => [
1421 48
                            'base',
1422 48
                        ],
1423 48
                        'components' => [
1424 48
                            Api\Controllers\ClamavController::class => ['*']
1425 48
                        ],
1426 48
                    ],
1427
                    
1428
                    // Everyone without role
1429 48
                    'guest' => [
1430 48
                        'features' => [
1431 48
                            'login',
1432 48
                            'logout',
1433 48
                            'register',
1434 48
                        ],
1435 48
                    ],
1436
                    
1437
                    // User
1438 48
                    'user' => [
1439 48
                        'features' => [
1440 48
                            'logout',
1441 48
                        ],
1442 48
                    ],
1443
                    
1444
                    // Admin
1445 48
                    'admin' => [
1446 48
                        'features' => [
1447 48
                            'manageUserList',
1448 48
                            'manageLangList',
1449 48
                            'manageSiteList',
1450 48
                            'managePageList',
1451 48
                            'managePostList',
1452 48
                            'manageTemplateList',
1453 48
                            'managePhalconMigrationsList',
1454 48
                        ],
1455 48
                        'inherit' => [
1456 48
                            'user',
1457 48
                        ],
1458 48
                        'behaviors' => [
1459 48
                        ],
1460 48
                    ],
1461
                    
1462
                    // Dev
1463 48
                    'dev' => [
1464 48
                        'features' => [
1465 48
                            'manageRoleList',
1466 48
                            'manageGroupList',
1467 48
                            'manageTypeList',
1468 48
                            'manageAuditList',
1469 48
                        ],
1470 48
                        'inherit' => [
1471 48
                            'user',
1472 48
                            'admin',
1473 48
                        ],
1474 48
                    ],
1475 48
                ],
1476 48
            ],
1477 48
        ], $data);
1478
        
1479
//        $data = $this->internalMergeAppend($data, (new AiConfig())->toArray());
1480
//        $data = $this->internalMergeAppend($data, (new ArticleConfig())->toArray());
1481
//        $data = $this->internalMergeAppend($data, (new AuditConfig())->toArray());
1482
//        $data = $this->internalMergeAppend($data, (new AuthConfig())->toArray());
1483
//        $data = $this->internalMergeAppend($data, (new CommentConfig())->toArray());
1484
//        $data = $this->internalMergeAppend($data, (new CountryConfig())->toArray());
1485
//        $data = $this->internalMergeAppend($data, (new DatatableStateConfig())->toArray());
1486
//        $data = $this->internalMergeAppend($data, (new FileConfig())->toArray());
1487
//        $data = $this->internalMergeAppend($data, (new KeywordConfig())->toArray());
1488
//        $data = $this->internalMergeAppend($data, (new NotificationConfig())->toArray());
1489
//        $data = $this->internalMergeAppend($data, (new ProjectConfig())->toArray());
1490
//        $data = $this->internalMergeAppend($data, (new ProjectStatusReasonConfig())->toArray());
1491
//        $data = $this->internalMergeAppend($data, (new RecordConfig())->toArray());
1492
//        $data = $this->internalMergeAppend($data, (new RoleConfig())->toArray());
1493
//        $data = $this->internalMergeAppend($data, (new SurveyConfig())->toArray());
1494
//        $data = $this->internalMergeAppend($data, (new SynonymConfig())->toArray());
1495
//        $data = $this->internalMergeAppend($data, (new TagConfig())->toArray());
1496
//        $data = $this->internalMergeAppend($data, (new TrackerConfig())->toArray());
1497
//        $data = $this->internalMergeAppend($data, (new UserConfig())->toArray());
1498 48
        $data = $this->internalMergeAppend($data, (new WorkspaceConfig())->toArray());
1499 48
        $data = $this->internalMergeAppend($data, (new TableConfig())->toArray());
1500
        
1501 48
        parent::__construct($data, $insensitive);
1502
    }
1503
}
1504