@@ -313,7 +313,7 @@ |
||
| 313 | 313 | if ($_SERVER['REQUEST_METHOD'] != 'JSON') |
| 314 | 314 | throw new \LogicException("Request method is not JSON"); |
| 315 | 315 | |
| 316 | - $input = file_get_contents('php://input'); |
|
| 316 | + $input = file_get_contents('php://input'); |
|
| 317 | 317 | $array = explode("&", $input); |
| 318 | 318 | |
| 319 | 319 | $result = []; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function __construct($name, Array $parameters = []) |
| 87 | 87 | { |
| 88 | - $this->name = $name; |
|
| 88 | + $this->name = $name; |
|
| 89 | 89 | $this->setParams($parameters); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -101,12 +101,12 @@ discard block |
||
| 101 | 101 | $_view = $this->path . DIRECTORY_SEPARATOR . $this->name . '.phtml'; |
| 102 | 102 | |
| 103 | 103 | if (!file_exists($_view)) |
| 104 | - throw new Exception\ViewNotFoundException("The view '" .$this->name. "' does not exists"); |
|
| 104 | + throw new Exception\ViewNotFoundException("The view '" . $this->name . "' does not exists"); |
|
| 105 | 105 | |
| 106 | 106 | $contents = file_get_contents($_view); |
| 107 | 107 | |
| 108 | 108 | if ($contents === false) |
| 109 | - throw new Exception\ViewGetContentsErrorException("The view '" .$this->name. "' does not exists"); |
|
| 109 | + throw new Exception\ViewGetContentsErrorException("The view '" . $this->name . "' does not exists"); |
|
| 110 | 110 | |
| 111 | 111 | return $contents; |
| 112 | 112 | } |
@@ -263,11 +263,10 @@ discard block |
||
| 263 | 263 | { |
| 264 | 264 | foreach ($this->routes as $key => $route) |
| 265 | 265 | { |
| 266 | - if |
|
| 267 | - ( |
|
| 268 | - $route["module"] == $this->identifiers["module"] && |
|
| 266 | + if ( |
|
| 267 | + $route["module"] == $this->identifiers["module"] && |
|
| 269 | 268 | $route["controller"] == $this->identifiers["controller"] && |
| 270 | - $route["view"] == $this->identifiers["view"] |
|
| 269 | + $route["view"] == $this->identifiers["view"] |
|
| 271 | 270 | ) |
| 272 | 271 | { |
| 273 | 272 | $module = $route["module"]; |
@@ -282,9 +281,8 @@ discard block |
||
| 282 | 281 | |
| 283 | 282 | if (count($this->defaults) && !$match) |
| 284 | 283 | { |
| 285 | - if |
|
| 286 | - ( |
|
| 287 | - !empty($this->defaults["module"]) && |
|
| 284 | + if ( |
|
| 285 | + !empty($this->defaults["module"]) && |
|
| 288 | 286 | !empty($this->defaults["controller"]) && |
| 289 | 287 | !empty($this->defaults["view"]) |
| 290 | 288 | ) |
@@ -190,17 +190,17 @@ |
||
| 190 | 190 | */ |
| 191 | 191 | public function run() |
| 192 | 192 | { |
| 193 | - $module = isset($_GET["module"]) ? $_GET["module"] : null; |
|
| 193 | + $module = isset($_GET["module"]) ? $_GET["module"] : null; |
|
| 194 | 194 | $controller = isset($_GET["controller"]) ? $_GET["controller"] : null; |
| 195 | - $view = isset($_GET["view"]) ? $_GET["view"] : null; |
|
| 195 | + $view = isset($_GET["view"]) ? $_GET["view"] : null; |
|
| 196 | 196 | |
| 197 | 197 | $request = new \Zend\Http\Request(); |
| 198 | 198 | |
| 199 | 199 | # build URI |
| 200 | 200 | $uri = ''; |
| 201 | - $uri .= !empty($module) ? '/' . $module : ""; |
|
| 201 | + $uri .= !empty($module) ? '/' . $module : ""; |
|
| 202 | 202 | $uri .= !empty($controller) ? '/' . $controller : ""; |
| 203 | - $uri .= !empty($view) ? '/' . $view : ""; |
|
| 203 | + $uri .= !empty($view) ? '/' . $view : ""; |
|
| 204 | 204 | |
| 205 | 205 | if (empty($uri)) |
| 206 | 206 | $uri = "/"; |