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

View   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 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