@@ -6,20 +6,20 @@ discard block |
||
6 | 6 | |
7 | 7 | defined('SOURCE_DIR') or define('SOURCE_DIR', __DIR__); |
8 | 8 | if (preg_match('/vendor/', SOURCE_DIR)) { |
9 | - defined('BASE_DIR') or define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..'); |
|
10 | - defined('CORE_DIR') or define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src'); |
|
11 | -} else { |
|
12 | - defined('BASE_DIR') or define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..'); |
|
13 | - defined('CORE_DIR') or define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules'); |
|
9 | + defined('BASE_DIR') or define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'); |
|
10 | + defined('CORE_DIR') or define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'src'); |
|
11 | +}else { |
|
12 | + defined('BASE_DIR') or define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..'); |
|
13 | + defined('CORE_DIR') or define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'modules'); |
|
14 | 14 | } |
15 | -defined('VENDOR_DIR') or define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor'); |
|
16 | -defined('LOG_DIR') or define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs'); |
|
17 | -defined('CACHE_DIR') or define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache'); |
|
18 | -defined('CONFIG_DIR') or define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config'); |
|
19 | -defined('WEB_DIR') or define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html'); |
|
20 | -defined('LOCALE_DIR') or define('LOCALE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'locale'); |
|
15 | +defined('VENDOR_DIR') or define('VENDOR_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'vendor'); |
|
16 | +defined('LOG_DIR') or define('LOG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'logs'); |
|
17 | +defined('CACHE_DIR') or define('CACHE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'cache'); |
|
18 | +defined('CONFIG_DIR') or define('CONFIG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'config'); |
|
19 | +defined('WEB_DIR') or define('WEB_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'html'); |
|
20 | +defined('LOCALE_DIR') or define('LOCALE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'locale'); |
|
21 | 21 | |
22 | -if(!class_exists(bootstrap::class)) { |
|
22 | +if (!class_exists(bootstrap::class)) { |
|
23 | 23 | /** |
24 | 24 | * Class Bootstrap |
25 | 25 | * @package PSFS |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | class bootstrap { |
28 | 28 | protected static $loaded = false; |
29 | 29 | public static function load() { |
30 | - if(!self::$loaded) { |
|
30 | + if (!self::$loaded) { |
|
31 | 31 | defined('PSFS_BOOTSTRAP_LOADED') or define('PSFS_BOOTSTRAP_LOADED', true); |
32 | - if(class_exists("\\PSFS\\base\\Logger")) \PSFS\base\Logger::log('Bootstrap initialized', LOG_INFO); |
|
32 | + if (class_exists("\\PSFS\\base\\Logger")) \PSFS\base\Logger::log('Bootstrap initialized', LOG_INFO); |
|
33 | 33 | self::$loaded = true; |
34 | 34 | } |
35 | 35 | } |
@@ -29,7 +29,9 @@ |
||
29 | 29 | public static function load() { |
30 | 30 | if(!self::$loaded) { |
31 | 31 | defined('PSFS_BOOTSTRAP_LOADED') or define('PSFS_BOOTSTRAP_LOADED', true); |
32 | - if(class_exists("\\PSFS\\base\\Logger")) \PSFS\base\Logger::log('Bootstrap initialized', LOG_INFO); |
|
32 | + if(class_exists("\\PSFS\\base\\Logger")) { |
|
33 | + \PSFS\base\Logger::log('Bootstrap initialized', LOG_INFO); |
|
34 | + } |
|
33 | 35 | self::$loaded = true; |
34 | 36 | } |
35 | 37 | } |