-
Notifications
You must be signed in to change notification settings - Fork 5
/
application.php
36 lines (33 loc) · 1.17 KB
/
application.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
<?php
use Opulence\Framework\Configuration\Config;
use Opulence\Ioc\Bootstrappers\BootstrapperResolver;
use Opulence\Ioc\IContainer;
/**
* ----------------------------------------------------------
* Load some global config settings
* ----------------------------------------------------------
*
* @var array $paths The list of paths
*/
Config::setCategory('paths', $paths);
Config::setCategory('views', require __DIR__ . '/http/views.php');
/**
* ----------------------------------------------------------
* Set up the bootstrappers
* ----------------------------------------------------------
*
* The following starts settings up the bootstrappers
*/
$container = require __DIR__ . '/ioc.php';
$bootstrapperResolver = new BootstrapperResolver();
$globalBootstrapperPath = __DIR__ . '/bootstrappers.php';
$globalBootstrappers = require $globalBootstrapperPath;
/**
* ----------------------------------------------------------
* Set some bindings
* ----------------------------------------------------------
*
* You don't do this in a bootstrapper because you need them
* bound before bootstrappers are even run
*/
$container->bindInstance(IContainer::class, $container);