-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.php
More file actions
40 lines (28 loc) · 847 Bytes
/
start.php
File metadata and controls
40 lines (28 loc) · 847 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
<?php
error_reporting (E_ALL);
$loader = require_once '../../vendor/autoload.php';
// Autoload the example app
$loader->add ('Example\\', __DIR__ . '/../app/');
// Start the app
$app = \Neuron\Application::getInstance ();
// Load the router
$app->setRouter (include ('router.php'));
// Set config folder
\Neuron\Config::folder (__DIR__ . '/../config/');
// Optionally, set an environment
$hostname = trim (file_get_contents ('/etc/hostname'));
switch ($hostname)
{
case 'my-computer':
case 'thijs-home-i7':
\Neuron\Config::environment ('development');
break;
}
// Set the template folder
\Neuron\Core\Template::addPath (__DIR__ . '/../templates/');
// Set the locale
$app->setLocale ('nl_BE.utf8');
// Set our own domain
\Neuron\Tools\Text::getInstance ()->addPath ('example', __DIR__ . '/../locales/');
// Return app
return $app;