Completed
Push — master ( d935de...f6e733 )
by Park Jong-Hun
04:25
created

AuthBootstrap::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

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 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace App\Bootstrap;
4
5
use Core\Application;
6
use Core\Bootstrap\BootstrapInterface;
7
use App\Auth\AuthManager;
8
9
class AuthBootstrap implements BootstrapInterface
10
{
11
12
    public function boot(Application $app)
13
    {
14
        $auth = AuthManager::getInstance();
15
16
        $auth->setConfig($this->getAuthConfig());
17
        $auth->setAccountManagerConfig($this->getAccountManagerConfig());
18
        $auth->setLoginManagerConfig($this->getLoginManagerConfig());
19
    }
20
21
    private function getAuthConfig()
22
    {
23
        return require __DIR__ . '/../Auth/config/config.php';
24
    }
25
26
    private function getAccountManagerConfig()
27
    {
28
        return require __DIR__ . '/../Auth/config/accountManager.php';
29
    }
30
31
    private function getLoginManagerConfig()
32
    {
33
        return require __DIR__ . '/../Auth/config/loginManager.php';
34
    }
35
}
36