Completed
Push — master ( 84dbb5...744962 )
by Thierry
01:43
created

Template::addViewNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Template.php - Trait for template functions
5
 *
6
 * @package jaxon-core
7
 * @author Thierry Feuzeu <[email protected]>
8
 * @copyright 2016 Thierry Feuzeu <[email protected]>
9
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
10
 * @link https://github.com/jaxon-php/jaxon-core
11
 */
12
13
namespace Jaxon\Utils\Traits;
14
15
use Jaxon\DI\Container;
16
17
trait Template
18
{
19
    /**
20
     * Render a template
21
     *
22
     * @param string        $sTemplate            The name of template to be rendered
23
     * @param string        $aVars                The template vars
24
     *
25
     * @return string        The template content
26
     */
27
    public function render($sTemplate, array $aVars = [])
28
    {
29
        return Container::getInstance()->getTemplate()->render($sTemplate, $aVars);
30
    }
31
}
32