Completed
Push — master ( 09ed12...283542 )
by Changwan
03:07
created

PhiewServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
namespace Wandu\View;
3
4
use Wandu\DI\ContainerInterface;
5
use Wandu\DI\ServiceProviderInterface;
6
use Wandu\View\Contracts\RenderInterface;
7
use function Wandu\Foundation\config;
8
use Wandu\View\Phiew\Configuration;
9
use Wandu\View\Phiew\Contracts\ResolverInterface;
10
use Wandu\View\Phiew\FileResolver;
11
12
class PhiewServiceProvider implements ServiceProviderInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function register(ContainerInterface $app)
18
    {
19
        $app->closure(Configuration::class, function () {
20
            $conf = new Configuration();
21
            $conf->path[] = 'views';
22
            return $conf;
23
        });
24
        $app->bind(ResolverInterface::class, FileResolver::class);
25
        $app->bind(RenderInterface::class, Phiew::class);
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function boot(ContainerInterface $app)
32
    {
33
    }
34
}
35