Completed
Push — master ( 8aac33...fe291a )
by Park Jong-Hun
02:40
created

Welcome::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Controller\Admin;
4
5
use Core\Application;
6
use Core\ViewModel;
7
8
class Welcome {
9
    public function __construct(ViewModel $view, $urlPattern)
10
    {
11
        $view->set('nav', $urlPattern);
12
    }
13
14
    public function index(ViewModel $view) {
15
        $view->set('siteUrl', Application::getUrl());
16
        $view->set('sitePublicUrl', Application::getPublicUrl());
17
18
        $view->set('absolutePath', realpath(__DIR__ . '/../../'));
19
        $view->set('phpVersion', PHP_VERSION);
20
        $view->set('os', PHP_OS);
21
        $view->set('sapi', PHP_SAPI);
22
23
        return 'server';
24
    }
25
}