forked from php-censor/php-censor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
44 lines (34 loc) · 895 Bytes
/
Copy pathbootstrap.php
File metadata and controls
44 lines (34 loc) · 895 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
40
41
42
43
44
<?php
// Define the root directory
if (!defined('ROOT_DIR')) {
define('ROOT_DIR', __DIR__ . '/');
}
// Define the src directory
if (!defined('SRC_DIR')) {
define('SRC_DIR', ROOT_DIR . 'src/');
}
// Define the public directory
if (!defined('PUBLIC_DIR')) {
define('PUBLIC_DIR', ROOT_DIR . 'public/');
}
// Define the application directory
if (!defined('APP_DIR')) {
define('APP_DIR', ROOT_DIR . 'app/');
}
// Define the BIN directory
if (!defined('BIN_DIR')) {
define('BIN_DIR', ROOT_DIR . 'bin/');
}
// Define the runtime directory
if (!defined('RUNTIME_DIR')) {
define('RUNTIME_DIR', ROOT_DIR . 'runtime/');
}
require_once(ROOT_DIR . 'vendor/autoload.php');
use PHPCensor\Config;
use PHPCensor\Helper\Lang;
$config = new Config();
$configFile = APP_DIR . 'config.yml';
if (file_exists($configFile)) {
$config->loadYaml($configFile);
}
Lang::init($config);