1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace ICanBoogie;
13
14 15 16 17 18
19 defined('ICanBoogie\ROOT')
20 or define('ICanBoogie\ROOT', rtrim(__DIR__, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
21
22 23 24 25 26
27 define('ICanBoogie\ASSETS', ROOT . 'assets' . DIRECTORY_SEPARATOR);
28
29 30 31 32 33 34 35 36 37
38 defined('ICanBoogie\DOCUMENT_ROOT')
39 or define('ICanBoogie\DOCUMENT_ROOT', rtrim(strtr($_SERVER['DOCUMENT_ROOT'] ?: getcwd(), DIRECTORY_SEPARATOR == '/' ? '\\' : '/', DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
40
41 42 43 44 45 46
47 defined('ICanBoogie\REPOSITORY')
48 or define('ICanBoogie\REPOSITORY', DOCUMENT_ROOT . 'repository' . DIRECTORY_SEPARATOR);
49
50 51 52 53 54
55 defined('ICanBoogie\AUTOCONFIG_PATHNAME')
56 or define('ICanBoogie\AUTOCONFIG_PATHNAME', dirname(__DIR__) . DIRECTORY_SEPARATOR . 'auto-config.php');
57
58 59 60 61 62
63 function get_autoconfig()
64 {
65 return require AUTOCONFIG_PATHNAME;
66 }
67
68 register_shutdown_function('ICanBoogie\Debug::shutdown_handler');
69
70 require_once ROOT . 'patches.php';