@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | return $this->output; |
288 | 288 | } |
289 | 289 | |
290 | - /** |
|
291 | - * Set the final page to be rendered |
|
292 | - * @param string $output the content of the final page |
|
293 | - * |
|
294 | - * @return object |
|
295 | - */ |
|
290 | + /** |
|
291 | + * Set the final page to be rendered |
|
292 | + * @param string $output the content of the final page |
|
293 | + * |
|
294 | + * @return object |
|
295 | + */ |
|
296 | 296 | public function setOutput($output) { |
297 | 297 | $this->output = $output; |
298 | 298 | return $this; |
@@ -367,12 +367,12 @@ discard block |
||
367 | 367 | //@codeCoverageIgnoreEnd |
368 | 368 | } |
369 | 369 | |
370 | - /** |
|
371 | - * Dispatch the FINAL_VIEW_READY event |
|
372 | - * |
|
373 | - * @return string|null the final view content after processing by each listener |
|
374 | - * if they exists otherwise the same content will be returned |
|
375 | - */ |
|
370 | + /** |
|
371 | + * Dispatch the FINAL_VIEW_READY event |
|
372 | + * |
|
373 | + * @return string|null the final view content after processing by each listener |
|
374 | + * if they exists otherwise the same content will be returned |
|
375 | + */ |
|
376 | 376 | protected function dispatchFinalViewEvent() { |
377 | 377 | //dispatch |
378 | 378 | $event = get_instance()->eventdispatcher->dispatch( |
@@ -416,12 +416,12 @@ discard block |
||
416 | 416 | && (bool) ini_get('zlib.output_compression') === false; |
417 | 417 | } |
418 | 418 | |
419 | - /** |
|
420 | - * Return the default full file path for view |
|
421 | - * @param string $file the filename |
|
422 | - * |
|
423 | - * @return string|null the full file path |
|
424 | - */ |
|
419 | + /** |
|
420 | + * Return the default full file path for view |
|
421 | + * @param string $file the filename |
|
422 | + * |
|
423 | + * @return string|null the full file path |
|
424 | + */ |
|
425 | 425 | protected function getDefaultFilePathForView($file){ |
426 | 426 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
427 | 427 | $fullFilePath = null; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $headerModifiedSince = $globals->server('HTTP_IF_MODIFIED_SINCE'); |
455 | 455 | if (!empty($headerModifiedSince) && $lastModified <= strtotime($headerModifiedSince)) { |
456 | 456 | $this->logger->info('The cache page content is not yet expire for the ' |
457 | - . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
457 | + . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
458 | 458 | $this->setStatus(304); |
459 | 459 | $this->sendHeaders(); |
460 | 460 | return true; |
@@ -470,8 +470,8 @@ discard block |
||
470 | 470 | */ |
471 | 471 | protected function sendCachePageContentToBrowser(&$cache) { |
472 | 472 | $this->logger->info('The cache page content is expired or the browser does ' |
473 | - . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
474 | - . 'send cache headers to tell the browser'); |
|
473 | + . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
474 | + . 'send cache headers to tell the browser'); |
|
475 | 475 | $this->sendHeaders(); |
476 | 476 | //current page cache key |
477 | 477 | $pageCacheKey = $this->currentUrlCacheKey; |
@@ -610,18 +610,18 @@ discard block |
||
610 | 610 | } |
611 | 611 | } |
612 | 612 | |
613 | - /** |
|
614 | - * Set the mandory headers, like security, etc. |
|
615 | - */ |
|
613 | + /** |
|
614 | + * Set the mandory headers, like security, etc. |
|
615 | + */ |
|
616 | 616 | protected function setRequiredHeaders() { |
617 | 617 | $requiredHeaders = array( |
618 | 618 | 'X-XSS-Protection' => '1; mode=block', |
619 | 619 | 'X-Frame-Options' => 'SAMEORIGIN' |
620 | 620 | ); |
621 | 621 | foreach ($requiredHeaders as $key => $value) { |
622 | - if (!isset($this->headers[$key])) { |
|
622 | + if (!isset($this->headers[$key])) { |
|
623 | 623 | $this->headers[$key] = $value; |
624 | - } |
|
624 | + } |
|
625 | 625 | } |
626 | 626 | } |
627 | 627 | } |
@@ -278,14 +278,14 @@ discard block |
||
278 | 278 | } |
279 | 279 | |
280 | 280 | /** |
281 | - * Setting the route configuration using the configuration file |
|
282 | - * and additional configuration from param |
|
283 | - * @param array $overwriteConfig the additional configuration |
|
284 | - * to overwrite with the existing one |
|
285 | - * @param boolean $useConfigFile whether to use route configuration file |
|
286 | - * |
|
287 | - * @return object |
|
288 | - */ |
|
281 | + * Setting the route configuration using the configuration file |
|
282 | + * and additional configuration from param |
|
283 | + * @param array $overwriteConfig the additional configuration |
|
284 | + * to overwrite with the existing one |
|
285 | + * @param boolean $useConfigFile whether to use route configuration file |
|
286 | + * |
|
287 | + * @return object |
|
288 | + */ |
|
289 | 289 | public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) { |
290 | 290 | $route = array(); |
291 | 291 | if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | //the URL like http://domain.com/module/controller/method/arg1/arg2/argn |
367 | 367 | if (!$this->controller && $this->routeMethodMatch /* normally if the route method isnot match no need continue */) { |
368 | 368 | $this->logger->info('Cannot determine the routing information ' |
369 | - . 'using the predefined routes configuration, will use the request URI parameters'); |
|
369 | + . 'using the predefined routes configuration, will use the request URI parameters'); |
|
370 | 370 | //determine route parameters using the route URI param |
371 | 371 | $this->determineRouteParamsFromRequestUri(); |
372 | 372 | } |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | |
396 | 396 | //if the request method not match |
397 | 397 | if(!$this->routeMethodMatch){ |
398 | - //create the instance of Controller |
|
398 | + //create the instance of Controller |
|
399 | 399 | $cError = new Controller(); |
400 | 400 | $cError->response->setStatus(405); |
401 | 401 | $cError->response->setOutput('HTTP method [' . $this->requestMethod . '] not allowed'); |
@@ -493,11 +493,11 @@ discard block |
||
493 | 493 | } |
494 | 494 | } |
495 | 495 | |
496 | - /** |
|
497 | - * Remove the URL suffix and query string values if exists |
|
498 | - * @param string $uri the route URI to process |
|
499 | - * @return string the final route uri after processed |
|
500 | - */ |
|
496 | + /** |
|
497 | + * Remove the URL suffix and query string values if exists |
|
498 | + * @param string $uri the route URI to process |
|
499 | + * @return string the final route uri after processed |
|
500 | + */ |
|
501 | 501 | protected function removeSuffixAndQueryStringFromUri($uri) { |
502 | 502 | $this->logger->debug('Check if URL suffix is enabled in the configuration'); |
503 | 503 | //remove url suffix from the request URI |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | $this->logger->info( |
627 | 627 | 'After loop in predefined routes configuration,' |
628 | 628 | . 'the module name is set but the controller is not set,' |
629 | - . 'so we will use module as the controller' |
|
629 | + . 'so we will use module as the controller' |
|
630 | 630 | ); |
631 | 631 | $this->controller = $this->module; |
632 | 632 | } |