Completed
Push — master ( 6c83b3...c25ca3 )
by Park Jong-Hun
04:06 queued 45s
created

Bootstrap::stripUrlPrefix()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 3
eloc 4
nc 3
nop 1
1
<?php
2
3
namespace Core\Bootstrap;
4
5
use Core\Application;
6
use Zend\Diactoros\ServerRequestFactory;
7
use Zend\Diactoros\Uri;
8
9
class Bootstrap
10
{
11
    /**
12
     * @var Application
13
     */
14
    private $app;
15
16
    private $bootstraps = [];
17
18
    public function __construct()
19
    {
20
        $this->app = Application::getInstance();
21
        $this->bootstraps = require __DIR__ . '/../../config/bootstrap.php';
22
    }
23
24
    public function boot()
25
    {
26
        foreach ($this->bootstraps as $bootstrapClassName) {
27
            /**
28
             * @var BootstrapInterface
29
             */
30
            $bootstrap = new $bootstrapClassName();
31
            $bootstrap->boot($this->app);
32
        }
33
    }
34
}
35