@@ -100,17 +100,17 @@ |
||
100 | 100 | $currentUri = null; |
101 | 101 | $filePhtml = null; |
102 | 102 | for($i=count($uri)-1; $i>=0; $i--){ |
103 | - $nextUri = implode('/',array_slice($uri,0,$i+1)); |
|
104 | - $getFile = function($type) use($path,$nextUri){ |
|
103 | + $nextUri = implode('/',array_slice($uri,0,$i+1)); |
|
104 | + $getFile = function($type) use($path,$nextUri){ |
|
105 | 105 | $file = $path.'/'.$nextUri.'/index.'.$type; |
106 | 106 | if(is_file($file)) return $file; |
107 | 107 | return null; |
108 | - }; |
|
109 | - $filePhtml = $getFile('phtml'); |
|
110 | - if($filePhtml) { $currentUri = $nextUri; break; } |
|
108 | + }; |
|
109 | + $filePhtml = $getFile('phtml'); |
|
110 | + if($filePhtml) { $currentUri = $nextUri; break; } |
|
111 | 111 | } |
112 | 112 | if($filePhtml === null) { |
113 | - $filePhtml = $path.'/index.phtml'; |
|
113 | + $filePhtml = $path.'/index.phtml'; |
|
114 | 114 | } |
115 | 115 | return $filePhtml; |
116 | 116 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | class View { |
5 | 5 | |
6 | 6 | public function __get($name){ |
7 | - (new Content)->view($name); |
|
7 | + (new Content)->view($name); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | } |