Passed
Push — master ( 786cae...5fe6af )
by Korotkov
03:49 queued 01:54
created

DemoController::containerInit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Demo;
4
5
use App\Ship\ShipController;
6
use Rudra\Container\Facades\Rudra;
7
use Rudra\View\ViewFacade as View;
8
use App\Containers\Demo\Tools\HelperTrait;
9
use Rudra\Controller\ContainerControllerInterface;
10
11
class DemoController extends ShipController implements ContainerControllerInterface
12
{
13
    use HelperTrait;
14
15
    public function containerInit(): void
16
    {
17
        $config = require_once "config.php";
18
19
        Rudra::binding()->set($config['contracts']);
20
        Rudra::waiting()->set($config['services']);
21
22
        View::setup(dirname(__DIR__) . '/', "Demo/UI/tmpl", "Demo/UI/cache");
23
24
        data([
25
            "title" => "Rudra Framework:: Demo Container",
26
        ]);
27
    }
28
}
29