-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.php
49 lines (43 loc) · 1.64 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
48
49
<?php
if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); }
/**
*---------------------------------------------------------------
* Autoloader / Compser
*---------------------------------------------------------------
*
* We need to access our dependencies & autloader..
*/
require __DIR__ . DS . 'vendor' . DS . 'autoload.php';
/**
* Set the timezone
*/
date_default_timezone_set('Europe/Zurich');
/**
*---------------------------------------------------------------
* Paths
*---------------------------------------------------------------
*
* Setup paths needed in the application
*/
define('VISU_PATH_ROOT', __DIR__);
define('VISU_PATH_CACHE', VISU_PATH_ROOT . DS . 'var' . DS . 'cache');
define('VISU_PATH_STORE', VISU_PATH_ROOT . DS . 'var' . DS . 'storage');
define('VISU_PATH_RESOURCES', VISU_PATH_ROOT . DS . 'resources');
define('VISU_PATH_LEVELS', VISU_PATH_RESOURCES . DS . 'levels');
define('VISU_PATH_RES_TERRAIN', VISU_PATH_RESOURCES . DS . 'terrain');
define('VISU_PATH_APPCONFIG', VISU_PATH_ROOT . DS . 'app');
define('PHPCRAFT_LEVELS_PATH', VISU_PATH_ROOT . DS . 'levels');
/**
*---------------------------------------------------------------
* VISU
*---------------------------------------------------------------
*
* Load the visu bootstrap file, which will create and return the
* application container.
*/
$container = require __DIR__ . DS . 'vendor' . DS . 'phpgl' . DS . 'visu' . DS . 'bootstrap.php';
// this is the place to do custom things just after VISU initalized.
// you can also hook into `bootstrap.pre` and `bootstrap.pre` events.
// ...
// forward the container
return $container;