-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.php
More file actions
125 lines (101 loc) · 3.27 KB
/
Copy pathstart.php
File metadata and controls
125 lines (101 loc) · 3.27 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php namespace Feather;
/*
|--------------------------------------------------------------------------
| Feather Definitions
|--------------------------------------------------------------------------
|
| Define some constants used by Feather.
|
*/
define('FEATHER_VERSION', '1.0.0');
define('FEATHER_DATABASE', 'feather');
/*
|--------------------------------------------------------------------------
| Path to Feather
|--------------------------------------------------------------------------
|
| Define some paths used by Feather.
|
*/
$app['feather']['path.extensions'] = $app['path.base'].'/feather/extensions';
$app['feather']['path.themes'] = $app['path.base'].'/feather/themes';
/*
|--------------------------------------------------------------------------
| Extension Class Loading
|--------------------------------------------------------------------------
|
| To keep extensions namespaced correctly we'll give the Composer
| autoloader the namespace and path to our extensions directory.
|
*/
$loader = require $app['path.base'].'/vendor/autoload.php';
$loader->add('Feather\\Extensions', $app['path.base']);
/*
|--------------------------------------------------------------------------
| Feather Configuration
|--------------------------------------------------------------------------
|
| Register some important configuration options that allows Feather to run
| smoothly.
|
*/
$app['config']->package('feather/feather', __DIR__);
$app['config']->set('database.connections.'.FEATHER_DATABASE, $app['config']['feather::database']);
$app['config']->set('database.migration.paths.feather', $app['feather']['path'].'/Migrations');
if ($app['cache']->has('config'))
{
$app['cache']->forget('config');
}
foreach (Models\Config::everything() as $item)
{
$app['config']->set("feather::{$item->name}", $item->value);
}
/*
|--------------------------------------------------------------------------
| Feather Components
|--------------------------------------------------------------------------
|
| Load in Feather's components.
|
*/
foreach ($app['config']['feather::providers'] as $provider)
{
$app->register(new $provider);
}
/*
|--------------------------------------------------------------------------
| Feather Facades
|--------------------------------------------------------------------------
|
| Load in the facades used by Feather's components.
|
*/
require __DIR__.'/facades.php';
/*
|--------------------------------------------------------------------------
| Feather Theme
|--------------------------------------------------------------------------
|
| Prepare the theme for Feather and setup theme development mode.
|
*/
$app['feather']['presenter']->prepare();
/*
|--------------------------------------------------------------------------
| Feather Extensions
|--------------------------------------------------------------------------
|
| Register the activated extensions with Feather.
|
*/
$extensions = Models\Extension::activated();
$app['feather']['extensions']->registerExtensions($extensions);
/*
|--------------------------------------------------------------------------
| Feather Application Routes
|--------------------------------------------------------------------------
|
| Register application routes for Feather.
|
*/
$app['feather']->parseRoutes(require __DIR__.'/routes.php');