Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class Template { |
||
17 | |||
18 | use Singleton; |
||
19 | |||
20 | protected static $dir = 'app/template/'; |
||
21 | protected static $themeDefault = 'default'; |
||
22 | |||
23 | /** |
||
24 | * Nome do Tema atual |
||
25 | * @var string |
||
26 | */ |
||
27 | private static $theme = null; |
||
28 | |||
29 | /** |
||
30 | * Define o nome do Tema atual (Antes de instanciar o Application) |
||
31 | * |
||
32 | * Após esta chamada, todos os Blocos e Views serão buscados "template/[$theme]" |
||
33 | * @param string $theme |
||
34 | */ |
||
35 | public function setTheme($theme) { |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Retorna o nome do Tema atual |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getTheme() { |
||
44 | return self::$theme; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Retorna o Novo caminho completo do arquivo |
||
49 | * (incluindo o diretório do template atual) |
||
50 | * |
||
51 | * @param string $dir diretório atual da View |
||
52 | * @param string $file Arquivo atual da View |
||
53 | * @return string Novo caminho completo da View |
||
54 | */ |
||
55 | public function getFilePath($dir, $file) { |
||
62 | } |
||
63 | |||
65 |