@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | public function setLocale($locale) { |
45 | - $format = new \Transphporm\Module\Format($locale); |
|
46 | - $this->modules[get_class($format)] = $format; |
|
47 | - } |
|
45 | + $format = new \Transphporm\Module\Format($locale); |
|
46 | + $this->modules[get_class($format)] = $format; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | public function addPath($dir) { |
50 | 50 | $this->filePath->addPath($dir); |
@@ -100,15 +100,15 @@ discard block |
||
100 | 100 | |
101 | 101 | //Load a template, firstly check if it's a file or a valid string |
102 | 102 | private function loadTemplate() { |
103 | - $result = ['cache' => $this->template, 'headers' => []]; |
|
103 | + $result = ['cache' => $this->template, 'headers' => []]; |
|
104 | 104 | if (strpos($this->template, "\n") === false && is_file($this->template)) $result = $this->loadTemplateFromFile($this->template); |
105 | 105 | return $result; |
106 | 106 | } |
107 | 107 | |
108 | - private function loadTemplateFromFile($file) { |
|
109 | - $xml = $this->cache->load($this->cacheKey . $file, filemtime($file)); |
|
110 | - return $xml ? $xml : ['cache' => file_get_contents($file) ?: "", 'headers' => []]; |
|
111 | - } |
|
108 | + private function loadTemplateFromFile($file) { |
|
109 | + $xml = $this->cache->load($this->cacheKey . $file, filemtime($file)); |
|
110 | + return $xml ? $xml : ['cache' => file_get_contents($file) ?: "", 'headers' => []]; |
|
111 | + } |
|
112 | 112 | |
113 | 113 | public function setCache(\ArrayAccess $cache) { |
114 | 114 | $this->cache = new Cache($cache); |