@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } else { |
190 | 190 | $this->logger->info('Cannot find view [' . $view . '] in module [' . $module . '] using the default location'); |
191 | 191 | } |
192 | - if (!$path) { |
|
192 | + if (!$path) { |
|
193 | 193 | $path = $this->getDefaultFilePathForView($viewFile); |
194 | 194 | } |
195 | 195 | $this->logger->info('The view file path to be loaded is [' . $path . ']'); |
@@ -289,12 +289,12 @@ discard block |
||
289 | 289 | return $this->finalPageContent; |
290 | 290 | } |
291 | 291 | |
292 | - /** |
|
293 | - * Set the final page to be rendered |
|
294 | - * @param string $finalPage the content of the final page |
|
295 | - * |
|
296 | - * @return object |
|
297 | - */ |
|
292 | + /** |
|
293 | + * Set the final page to be rendered |
|
294 | + * @param string $finalPage the content of the final page |
|
295 | + * |
|
296 | + * @return object |
|
297 | + */ |
|
298 | 298 | public function setFinalPageContent($finalPage) { |
299 | 299 | $this->finalPageContent = $finalPage; |
300 | 300 | return $this; |
@@ -371,12 +371,12 @@ discard block |
||
371 | 371 | } |
372 | 372 | |
373 | 373 | |
374 | - /** |
|
375 | - * Return the default full file path for view |
|
376 | - * @param string $file the filename |
|
377 | - * |
|
378 | - * @return string|null the full file path |
|
379 | - */ |
|
374 | + /** |
|
375 | + * Return the default full file path for view |
|
376 | + * @param string $file the filename |
|
377 | + * |
|
378 | + * @return string|null the full file path |
|
379 | + */ |
|
380 | 380 | protected function getDefaultFilePathForView($file){ |
381 | 381 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
382 | 382 | $fullFilePath = null; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $headerModifiedSince = $globals->server('HTTP_IF_MODIFIED_SINCE'); |
410 | 410 | if (!empty($headerModifiedSince) && $lastModified <= strtotime($headerModifiedSince)) { |
411 | 411 | $this->logger->info('The cache page content is not yet expire for the ' |
412 | - . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
412 | + . 'URL [' . $this->currentUrl . '] send 304 header to browser'); |
|
413 | 413 | $this->sendHeaders(304); |
414 | 414 | return true; |
415 | 415 | } |
@@ -424,8 +424,8 @@ discard block |
||
424 | 424 | */ |
425 | 425 | protected function sendCachePageContentToBrowser(&$cache) { |
426 | 426 | $this->logger->info('The cache page content is expired or the browser does ' |
427 | - . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
428 | - . 'send cache headers to tell the browser'); |
|
427 | + . 'not send the HTTP_IF_MODIFIED_SINCE header for the URL [' . $this->currentUrl . '] ' |
|
428 | + . 'send cache headers to tell the browser'); |
|
429 | 429 | $this->sendHeaders(200); |
430 | 430 | //current page cache key |
431 | 431 | $pageCacheKey = $this->currentUrlCacheKey; |
@@ -564,18 +564,18 @@ discard block |
||
564 | 564 | } |
565 | 565 | } |
566 | 566 | |
567 | - /** |
|
568 | - * Set the mandory headers, like security, etc. |
|
569 | - */ |
|
567 | + /** |
|
568 | + * Set the mandory headers, like security, etc. |
|
569 | + */ |
|
570 | 570 | protected function setRequiredHeaders() { |
571 | 571 | $requiredHeaders = array( |
572 | 572 | 'X-XSS-Protection' => '1; mode=block', |
573 | 573 | 'X-Frame-Options' => 'SAMEORIGIN' |
574 | 574 | ); |
575 | 575 | foreach ($requiredHeaders as $key => $value) { |
576 | - if (!isset($this->headers[$key])) { |
|
576 | + if (!isset($this->headers[$key])) { |
|
577 | 577 | $this->headers[$key] = $value; |
578 | - } |
|
578 | + } |
|
579 | 579 | } |
580 | 580 | } |
581 | 581 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | */ |
346 | 346 | public function sendError(array $data = array()) { |
347 | 347 | $path = CORE_VIEWS_PATH . 'errors.php'; |
348 | - if(file_exists($path)){ |
|
348 | + if (file_exists($path)) { |
|
349 | 349 | //compress the output if is available |
350 | 350 | $compressOutputHandler = $this->getCompressOutputHandler(); |
351 | 351 | ob_start($compressOutputHandler); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | echo $content; |
358 | 358 | } |
359 | 359 | //@codeCoverageIgnoreStart |
360 | - else{ |
|
360 | + else { |
|
361 | 361 | //can't use show_error() at this time because |
362 | 362 | //some dependencies not yet loaded |
363 | 363 | set_http_status_header(503); |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | * |
387 | 387 | * @return string|null the full file path |
388 | 388 | */ |
389 | - protected function getDefaultFilePathForView($file){ |
|
389 | + protected function getDefaultFilePathForView($file) { |
|
390 | 390 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
391 | 391 | $fullFilePath = null; |
392 | 392 | foreach ($searchDir as $dir) { |
@@ -140,11 +140,11 @@ |
||
140 | 140 | //NOTE: here need put the show_error() "logging" to false |
141 | 141 | //to prevent self function loop call |
142 | 142 | show_error('Invalid config log level [' . $configLogLevel . '], ' |
143 | - . 'the value must be one of the following: ' |
|
144 | - . implode(', ', array_map('strtoupper', self::$validConfigLevel)) |
|
145 | - , 'Log Config Error', |
|
146 | - $logging = false |
|
147 | - ); |
|
143 | + . 'the value must be one of the following: ' |
|
144 | + . implode(', ', array_map('strtoupper', self::$validConfigLevel)) |
|
145 | + , 'Log Config Error', |
|
146 | + $logging = false |
|
147 | + ); |
|
148 | 148 | return; |
149 | 149 | } |
150 | 150 |