Completed
Branch v2.0.0 (addc15)
by Alexander
03:27
created

View::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
rs 9.7333
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @author Alexander Torosh <[email protected]>
4
 */
5
6
namespace Web;
7
8
use Phalcon\Mvc\View as PhalconView;
9
use Phalcon\Mvc\View\Engine\Volt;
10
11
class View extends PhalconView
12
{
13
    public function __construct(array $options = [])
14
    {
15
        parent::__construct($options);
16
17
        $this->setViewsDir(getenv('ROOT_DIR').'/app/framework/web/modules/front/views/');
18
        $this->setMainView('front');
19
20
        $volt = new Volt($this, $this->getDI());
21
        $volt->setOptions([
22
            'path' => getenv('ROOT_DIR').'/cache/volt/',
23
        ]);
24
25
        $this->registerEngines([
26
            '.volt' => $volt,
27
        ]);
28
    }
29
}
30