@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $this->logger->info('Cannot find view [' . $view . '] in module [' . $module . '] ' |
| 186 | 186 | . 'using the default location'); |
| 187 | 187 | } |
| 188 | - if (!$path) { |
|
| 188 | + if (!$path) { |
|
| 189 | 189 | $path = $this->getDefaultFilePathForView($viewFile); |
| 190 | 190 | } |
| 191 | 191 | $this->logger->info('The view file path to be loaded is [' . $path . ']'); |
@@ -261,12 +261,12 @@ discard block |
||
| 261 | 261 | return $this->finalPageContent; |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | - /** |
|
| 265 | - * Set the final page to be rendered |
|
| 266 | - * @param string $finalPage the content of the final page |
|
| 267 | - * |
|
| 268 | - * @return object |
|
| 269 | - */ |
|
| 264 | + /** |
|
| 265 | + * Set the final page to be rendered |
|
| 266 | + * @param string $finalPage the content of the final page |
|
| 267 | + * |
|
| 268 | + * @return object |
|
| 269 | + */ |
|
| 270 | 270 | public function setFinalPageContent($finalPage) { |
| 271 | 271 | $this->finalPageContent = $finalPage; |
| 272 | 272 | return $this; |
@@ -340,11 +340,11 @@ discard block |
||
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | /** |
| 343 | - * Dispatch the FINAL_VIEW_READY event |
|
| 344 | - * |
|
| 345 | - * @return string|null the final view content after processing by each listener |
|
| 346 | - * if they exists otherwise the same content will be returned |
|
| 347 | - */ |
|
| 343 | + * Dispatch the FINAL_VIEW_READY event |
|
| 344 | + * |
|
| 345 | + * @return string|null the final view content after processing by each listener |
|
| 346 | + * if they exists otherwise the same content will be returned |
|
| 347 | + */ |
|
| 348 | 348 | protected function dispatchFinalViewEvent() { |
| 349 | 349 | //dispatch |
| 350 | 350 | $event = get_instance()->eventdispatcher->dispatch( |
@@ -388,12 +388,12 @@ discard block |
||
| 388 | 388 | && (bool) ini_get('zlib.output_compression') === false; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | - /** |
|
| 392 | - * Return the default full file path for view |
|
| 393 | - * @param string $file the filename |
|
| 394 | - * |
|
| 395 | - * @return string|null the full file path |
|
| 396 | - */ |
|
| 391 | + /** |
|
| 392 | + * Return the default full file path for view |
|
| 393 | + * @param string $file the filename |
|
| 394 | + * |
|
| 395 | + * @return string|null the full file path |
|
| 396 | + */ |
|
| 397 | 397 | protected function getDefaultFilePathForView($file){ |
| 398 | 398 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
| 399 | 399 | $fullFilePath = null; |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | $headerModifiedSince = $globals->server('HTTP_IF_MODIFIED_SINCE'); |
| 427 | 427 | if (!empty($headerModifiedSince) && $lastModified <= strtotime($headerModifiedSince)) { |
| 428 | 428 | $this->logger->info('The cache page content is not yet expire for the ' |
| 429 | - . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
| 429 | + . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
| 430 | 430 | $this->sendHeaders(304); |
| 431 | 431 | return true; |
| 432 | 432 | } |
@@ -441,8 +441,8 @@ discard block |
||
| 441 | 441 | */ |
| 442 | 442 | protected function sendCachePageContentToBrowser(&$cache) { |
| 443 | 443 | $this->logger->info('The cache page content is expired or the browser does ' |
| 444 | - . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
| 445 | - . 'send cache headers to tell the browser'); |
|
| 444 | + . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
| 445 | + . 'send cache headers to tell the browser'); |
|
| 446 | 446 | $this->sendHeaders(200); |
| 447 | 447 | //current page cache key |
| 448 | 448 | $pageCacheKey = $this->currentUrlCacheKey; |
@@ -581,18 +581,18 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | } |
| 583 | 583 | |
| 584 | - /** |
|
| 585 | - * Set the mandory headers, like security, etc. |
|
| 586 | - */ |
|
| 584 | + /** |
|
| 585 | + * Set the mandory headers, like security, etc. |
|
| 586 | + */ |
|
| 587 | 587 | protected function setRequiredHeaders() { |
| 588 | 588 | $requiredHeaders = array( |
| 589 | 589 | 'X-XSS-Protection' => '1; mode=block', |
| 590 | 590 | 'X-Frame-Options' => 'SAMEORIGIN' |
| 591 | 591 | ); |
| 592 | 592 | foreach ($requiredHeaders as $key => $value) { |
| 593 | - if (!isset($this->headers[$key])) { |
|
| 593 | + if (!isset($this->headers[$key])) { |
|
| 594 | 594 | $this->headers[$key] = $value; |
| 595 | - } |
|
| 595 | + } |
|
| 596 | 596 | } |
| 597 | 597 | } |
| 598 | 598 | } |