-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.php
99 lines (81 loc) · 3.06 KB
/
start.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
use Illuminate\Filesystem;
use Illuminate\Config\FileLoader;
use Illuminate\Config\ApcFileLoader;
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let's turn on the lights.
| This bootstraps the framework and gets it ready for use, meaning
| it just loads a couple of files that can not be handled by the
| class loader automatically generated by the Composer loaders.
|
*/
$app = Illuminate\Foundation\Lightbulb::on();
/*
|--------------------------------------------------------------------------
| Define The Application Path
|--------------------------------------------------------------------------
|
| Here we just defined the path to the application directory. Most likely
| you will never need to change this value, as the default setup should
| work perfectly fine for the vast majority of all application setups.
|
*/
$app['path'] = __DIR__.'/app';
$app['path.base'] = __DIR__;
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Illuminate takes a dead simple approach to application environments.
| Just specify the hosts that belong to a given environment, and we
| will quickly detect and set the application environment for you.
|
*/
$app->detectEnvironment(array(
'local' => array('localhost', '*.dev', '*.app'),
));
/*
|--------------------------------------------------------------------------
| Check For The Test Environment
|--------------------------------------------------------------------------
|
| If the "unitTesting" variable is set, it means we are running the unit
| tests for the application and should override this environment here
| so we use the right configuration. The flag gets set by TestCase.
|
*/
if (isset($unitTesting)) $app['env'] = $testEnvironment;
/*
|--------------------------------------------------------------------------
| Register The Configuration Loader
|--------------------------------------------------------------------------
|
| The configuration loader is responsible for loading the configuration
| options for the application. By default we'll use the "file" loader
| but you are free to use any custom loaders with your application.
|
*/
$app['config.loader'] = $app->share(function($app)
{
$path = $app['path'].'/config';
return new FileLoader(new Filesystem, $path);
});
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
|
| Here we will load the Illuminate application. We keep this is in
| a separate location so we can isolate the creation of the it
| from the actual running of the application, allowing us
| to easily test and inspect the application outside
| of a web request context such as with PHPUnit.
|
*/
require __DIR__.'/vendor/illuminate/foundation/src/start.php';
return $app;