Completed
Push — master ( 04e760...b100d6 )
by Park Jong-Hun
19:01
created

ApplicationBootstrap::getErrorReporterConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App\Bootstrap;
4
5
use Core\Application;
6
use Core\Bootstrap\BootstrapInterface;
7
use Core\Bootstrap\SiteConfigLoader;
8
9
class ApplicationBootstrap implements BootstrapInterface, SiteConfigLoader
10
{
11
12
    public function boot(Application $app)
13
    {
14
        $app->setSiteConfig($this->getSiteConfig());
15
16
        $app->setViewEngineConfig($this->getViewEngineConfig());
17
        $app->setViewResolver($this->getViewResolvers());
18
19
        $app->setRouterConfig($this->getRouterConfig());
20
    }
21
22
    public function getSiteConfig()
23
    {
24
        return require __DIR__ . '/../../config/site.php';
25
    }
26
27
    private function getViewEngineConfig()
28
    {
29
        return require __DIR__ . '/../../config/viewEngine.php';
30
    }
31
32
    private function getViewResolvers()
33
    {
34
        return require __DIR__ . '/../../config/viewResolver.php';
35
    }
36
37
    private function getRouterConfig()
38
    {
39
        return require __DIR__ . '/../../config/router.php';
40
    }
41
}
42