-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
executable file
·47 lines (35 loc) · 1.07 KB
/
bootstrap.php
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
45
46
47
<?php
use Garden\Event;
use Garden\Addons;
use Garden\Config;
use Garden\Translate;
use Garden\Db\Database;
use Garden\ErrorHandler;
// Require composer's autoloader.
require_once PATH_ROOT . '/vendor/autoload.php';
// Path to the primary configuration file
define('GDN_CONF', PATH_ROOT . '/config');
define('GDN_CACHE', PATH_ROOT . '/cache');
define('GDN_LOGS', GDN_CACHE . '/logs');
define('GDN_LOCALE', PATH_ROOT . '/locales');
if (!defined('GDN_SRC')) {
define('GDN_SRC', PATH_ROOT . '/system');
}
if (!defined('GDN_ADDONS')) {
define('GDN_ADDONS', PATH_ROOT . '/addons');
}
// Make sure a default time zone is set
// date_default_timezone_set('Europe/Samara');
// Load apps configs
Config::autoload();
// Register error handler
ErrorHandler::register();
// Enable addon functionality.
Addons::bootstrap();
// Fire the bootstrap event so that overridable function files can be included.
Event::fire('bootstrap');
// Load translates
Translate::autoload();
// Saving all configurations in the cache
Config::cache();
Database::instance('default', Config::get('database'));