-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
31 lines (24 loc) · 917 Bytes
/
Copy pathbootstrap.php
File metadata and controls
31 lines (24 loc) · 917 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
<?php
/*
|--------------------------------------------------------------------------
| Bootstrap.php
|--------------------------------------------------------------------------
| The purpose of the bootstrap file is to setup the application. At
| the end of the bootstrap file, return the dependency injection
| container, so you can use it later in the application to resolve the
| object instances.
|
*/
use DI\ContainerBuilder;
require __DIR__ . '/vendor/autoload.php';
// Display errors ..
ini_set("display_errors", 1);
error_reporting(E_ALL);
// Init config
$containerConfigPath = __DIR__ . '/config/container-defs.php';
// The purpose of the bootstrap file is to return the dic container.
// The definition of the continer can be found in /config/container-defs.php file
$builder = new ContainerBuilder();
$builder->addDefinitions($containerConfigPath);
$container = $builder->build();
return $container;