-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
39 lines (32 loc) · 910 Bytes
/
Copy pathconfig.php
File metadata and controls
39 lines (32 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
/**
* Start default session
* session initialize
*/
@session_start();
/**
* Dewfault time zone set
*/
date_default_timezone_set('Europe/Bucharest');
/**
* Loading env data
*/
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
/**
* Get .env file data
* @return env
*/
function env(string $name, bool $local_only = false) {
return isset($_ENV) ? $_ENV[$name] : '';
}
/**
* Define php path routes string
*/
define('ROOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
define('APP_PATH', 'application' . DIRECTORY_SEPARATOR);
define('CORE_PATH', 'core' . DIRECTORY_SEPARATOR);
define('THEMES_PATH', 'application\themes' . DIRECTORY_SEPARATOR . env('APP_THEME') . DIRECTORY_SEPARATOR);
define('LANGUAGE_PATH', 'application\languages\\' . env('APP_LANG') . DIRECTORY_SEPARATOR);
define('CACHE_PATH', 'application\cache' . DIRECTORY_SEPARATOR);