Total Complexity | 6 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Template |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $_template = 'default'; |
||
14 | |||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | private $_properties = []; |
||
19 | |||
20 | /** |
||
21 | * Método mágico para setear propiedades |
||
22 | * @param string $prop |
||
23 | * @param mixed $value |
||
24 | */ |
||
25 | public function __set($prop, $value) |
||
26 | { |
||
27 | $this->_properties[$prop] = $value; |
||
28 | } |
||
29 | |||
30 | |||
31 | /** |
||
32 | * Método mágico para obtener propiedades |
||
33 | * @param string $prop |
||
34 | * @return mixed|null |
||
35 | */ |
||
36 | public function __get($prop) |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Permite setear el template manualmente |
||
43 | * @param string $template |
||
44 | */ |
||
45 | public function setTemplate($template) |
||
48 | } |
||
49 | |||
50 | |||
51 | /** |
||
52 | * Permite renderizar una vista dentro de la plantilla |
||
53 | * @param string $view |
||
54 | */ |
||
55 | public function render($view) |
||
68 | } |