@@ -178,20 +178,20 @@ |
||
178 | 178 | $config['log_logger_name'] = array(); |
179 | 179 | |
180 | 180 | /** |
181 | - * The logger name custom level to use for the log |
|
182 | - * |
|
183 | - * If this config is set so means the logger level will be used to overwrite |
|
184 | - * the default log level configuration above. |
|
185 | - * |
|
186 | - * Example: |
|
187 | - * $config['log_logger_name_level'] = array('MY_LOGGER1' => 'WARNING'); |
|
188 | - * So if $config['log_level'] = 'ERROR' but all log messages with "MY_LOGGER1" as logger name |
|
189 | - * will be saved for WARNING message and above |
|
190 | - * Note: You can also use an regular expression for the logger name. |
|
191 | - * Example: |
|
192 | - * $config['log_logger_name_level'] = array('^Class::Con(.*)' => 'info'); |
|
193 | - * So all logger name like "Class::Config", "Class::Cookie", etc. will be match |
|
194 | - */ |
|
181 | + * The logger name custom level to use for the log |
|
182 | + * |
|
183 | + * If this config is set so means the logger level will be used to overwrite |
|
184 | + * the default log level configuration above. |
|
185 | + * |
|
186 | + * Example: |
|
187 | + * $config['log_logger_name_level'] = array('MY_LOGGER1' => 'WARNING'); |
|
188 | + * So if $config['log_level'] = 'ERROR' but all log messages with "MY_LOGGER1" as logger name |
|
189 | + * will be saved for WARNING message and above |
|
190 | + * Note: You can also use an regular expression for the logger name. |
|
191 | + * Example: |
|
192 | + * $config['log_logger_name_level'] = array('^Class::Con(.*)' => 'info'); |
|
193 | + * So all logger name like "Class::Config", "Class::Cookie", etc. will be match |
|
194 | + */ |
|
195 | 195 | $config['log_logger_name_level'] = array(); |
196 | 196 | |
197 | 197 |
@@ -198,17 +198,17 @@ discard block |
||
198 | 198 | die(); |
199 | 199 | } |
200 | 200 | |
201 | - /** |
|
202 | - * Function defined for PHP error message handling |
|
203 | - * |
|
204 | - * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
205 | - * @param string $errstr the error message |
|
206 | - * @param string $errfile the file where the error occurred |
|
207 | - * @param int $errline the line number where the error occurred |
|
208 | - * @codeCoverageIgnore |
|
209 | - * |
|
210 | - * @return boolean |
|
211 | - */ |
|
201 | + /** |
|
202 | + * Function defined for PHP error message handling |
|
203 | + * |
|
204 | + * @param int $errno the type of error for example: E_USER_ERROR, E_USER_WARNING, etc. |
|
205 | + * @param string $errstr the error message |
|
206 | + * @param string $errfile the file where the error occurred |
|
207 | + * @param int $errline the line number where the error occurred |
|
208 | + * @codeCoverageIgnore |
|
209 | + * |
|
210 | + * @return boolean |
|
211 | + */ |
|
212 | 212 | function fw_error_handler($errno, $errstr, $errfile, $errline) { |
213 | 213 | $isError = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $errno) === $errno); |
214 | 214 | if ($isError) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | break; |
230 | 230 | } |
231 | 231 | show_error('An error is occurred in the file <b>' . $errfile . '</b> at line <b>' |
232 | - . $errline . '</b> raison : ' . $errstr, 'PHP ' . $errorType); |
|
232 | + . $errline . '</b> raison : ' . $errstr, 'PHP ' . $errorType); |
|
233 | 233 | } |
234 | 234 | if ($isError) { |
235 | 235 | die(); |
@@ -277,14 +277,14 @@ discard block |
||
277 | 277 | } |
278 | 278 | |
279 | 279 | /** |
280 | - * Setting the route configuration using the configuration file |
|
281 | - * and additional configuration from param |
|
282 | - * @param array $overwriteConfig the additional configuration |
|
283 | - * to overwrite with the existing one |
|
284 | - * @param boolean $useConfigFile whether to use route configuration file |
|
285 | - * |
|
286 | - * @return object |
|
287 | - */ |
|
280 | + * Setting the route configuration using the configuration file |
|
281 | + * and additional configuration from param |
|
282 | + * @param array $overwriteConfig the additional configuration |
|
283 | + * to overwrite with the existing one |
|
284 | + * @param boolean $useConfigFile whether to use route configuration file |
|
285 | + * |
|
286 | + * @return object |
|
287 | + */ |
|
288 | 288 | public function setRouteConfiguration(array $overwriteConfig = array(), $useConfigFile = true) { |
289 | 289 | $route = array(); |
290 | 290 | if ($useConfigFile && file_exists(CONFIG_PATH . 'routes.php')) { |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | //the URL like http://domain.com/module/controller/method/arg1/arg2 |
366 | 366 | if (!$this->controller) { |
367 | 367 | $this->logger->info('Cannot determine the routing information ' |
368 | - . 'using the predefined routes configuration, will use the request URI parameters'); |
|
368 | + . 'using the predefined routes configuration, will use the request URI parameters'); |
|
369 | 369 | //determine route parameters using the route URI param |
370 | 370 | $this->determineRouteParamsFromRequestUri(); |
371 | 371 | } |
@@ -478,11 +478,11 @@ discard block |
||
478 | 478 | } |
479 | 479 | } |
480 | 480 | |
481 | - /** |
|
482 | - * Remove the URL suffix and query string values if exists |
|
483 | - * @param string $uri the route URI to process |
|
484 | - * @return string the final route uri after processed |
|
485 | - */ |
|
481 | + /** |
|
482 | + * Remove the URL suffix and query string values if exists |
|
483 | + * @param string $uri the route URI to process |
|
484 | + * @return string the final route uri after processed |
|
485 | + */ |
|
486 | 486 | protected function removeSuffixAndQueryStringFromUri($uri) { |
487 | 487 | $this->logger->debug('Check if URL suffix is enabled in the configuration'); |
488 | 488 | //remove url suffix from the request URI |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | $this->logger->info( |
597 | 597 | 'After loop in predefined routes configuration,' |
598 | 598 | . 'the module name is set but the controller is not set,' |
599 | - . 'so we will use module as the controller' |
|
599 | + . 'so we will use module as the controller' |
|
600 | 600 | ); |
601 | 601 | $this->controller = $this->module; |
602 | 602 | } |
@@ -140,11 +140,11 @@ discard block |
||
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 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | protected function levelCanSaveLog($level) { |
215 | 215 | $result = true; |
216 | 216 | $configLogLevel = get_config('log_level'); |
217 | - //check if can save log regarding the log level configuration |
|
217 | + //check if can save log regarding the log level configuration |
|
218 | 218 | $configLevel = self::getLevelValue($configLogLevel); |
219 | 219 | if ($configLevel > $level) { |
220 | 220 | //can't log |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | //NOTE: here need put the show_error() "logging" to false |
295 | 295 | //to prevent self function loop call |
296 | 296 | show_error('Error : the log dir does not exist or is not writable', |
297 | - 'Log directory error', $logging = false); |
|
297 | + 'Log directory error', $logging = false); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | $path = $logSavePath . 'logs-' . date('Y-m-d') . '.log'; |