@@ -49,22 +49,22 @@ discard block |
||
49 | 49 | $cacheName = $name; |
50 | 50 | if (false === strpos($name, '.')) { |
51 | 51 | if (!empty($name)) { |
52 | - $name = '.' . $name; |
|
52 | + $name = '.'.$name; |
|
53 | 53 | } |
54 | - $name = 'view' . $name . '.html.php'; |
|
54 | + $name = 'view'.$name.'.html.php'; |
|
55 | 55 | $this->routeView = true; |
56 | 56 | |
57 | 57 | $stack = debug_backtrace(); |
58 | 58 | foreach ($stack as $item) { |
59 | - if (false !== stripos($item['file'], DIRECTORY_SEPARATOR . 'Route' . DIRECTORY_SEPARATOR)) { |
|
60 | - $cacheName = pathinfo($item['file'], PATHINFO_DIRNAME) . '/' . $name; |
|
61 | - $cacheName = explode('Route' . DIRECTORY_SEPARATOR, $cacheName)[1]; |
|
59 | + if (false !== stripos($item['file'], DIRECTORY_SEPARATOR.'Route'.DIRECTORY_SEPARATOR)) { |
|
60 | + $cacheName = pathinfo($item['file'], PATHINFO_DIRNAME).'/'.$name; |
|
61 | + $cacheName = explode('Route'.DIRECTORY_SEPARATOR, $cacheName)[1]; |
|
62 | 62 | $cacheName = str_replace(['/', '\\'], '_', $cacheName); |
63 | 63 | break; |
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
67 | - $path = $this->packageRoot . '/view/_cache/' . str_replace('/', '_', $cacheName); |
|
67 | + $path = $this->packageRoot.'/view/_cache/'.str_replace('/', '_', $cacheName); |
|
68 | 68 | |
69 | 69 | if (!file_exists($path) || !$this->cache) { |
70 | 70 | $code = $this->compile($name, true, true); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function clearCache() |
119 | 119 | { |
120 | - self::removeFromDir($this->packageRoot . '/view/_cache'); |
|
120 | + self::removeFromDir($this->packageRoot.'/view/_cache'); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -138,13 +138,13 @@ discard block |
||
138 | 138 | $path = ''; |
139 | 139 | $stack = debug_backtrace(); |
140 | 140 | foreach ($stack as $item) { |
141 | - if (false !== stripos($item['file'], DIRECTORY_SEPARATOR . 'Route' . DIRECTORY_SEPARATOR)) { |
|
142 | - $path = pathinfo($item['file'], PATHINFO_DIRNAME) . '/' . $name; |
|
141 | + if (false !== stripos($item['file'], DIRECTORY_SEPARATOR.'Route'.DIRECTORY_SEPARATOR)) { |
|
142 | + $path = pathinfo($item['file'], PATHINFO_DIRNAME).'/'.$name; |
|
143 | 143 | break; |
144 | 144 | } |
145 | 145 | } |
146 | 146 | } else { |
147 | - $path = $this->packageRoot . '/view/' . $name; |
|
147 | + $path = $this->packageRoot.'/view/'.$name; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | if (file_exists($path)) { |