AbstractController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 8
c 0
b 0
f 0
dl 0
loc 13
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 11 1
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Modules\Frontend\Controllers;
13
14
use Zemit\Modules\Frontend\Controller;
15
use Zemit\Tag;
16
17
abstract class AbstractController extends Controller
18
{
19
    public function initialize()
20
    {
21
        Tag::setAttr('html', ['lang' => $this->dispatcher->getParam('language', 'string', 'en')]);
22
        Tag::setTitle($this->config->path('core.name', 'Zemit Frontend'));
23
        
24
        $this->assets->collection('head')
25
            ->addCss('/head.css', true, true, [], null, true)
26
            ->addJs('/head.js', true, true, [], null, true);
27
28
        $this->assets->collection('footer')
29
            ->addJs('/footer.js', true, true, [], null, true);
30
    }
31
}
32