@@ -84,10 +84,10 @@ |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * This method is used to check the whitelist IP address access |
|
88 | - * |
|
89 | - * @return boolean |
|
90 | - */ |
|
87 | + * This method is used to check the whitelist IP address access |
|
88 | + * |
|
89 | + * @return boolean |
|
90 | + */ |
|
91 | 91 | public static function checkWhiteListIpAccess() { |
92 | 92 | $logger = self::getLogger(); |
93 | 93 | $logger->debug('Validation of the IP address access ...'); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $attributes['accept-charset'] = get_config('charset', 'UTF-8'); |
46 | 46 | } |
47 | 47 | if (!empty($enctype)) { |
48 | - $attributes['enctype'] = $enctype; |
|
48 | + $attributes['enctype'] = $enctype; |
|
49 | 49 | } |
50 | 50 | $str .= attributes_to_string($attributes); |
51 | 51 | $str .= '>'; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $logger->debug('Check if the application contains the modules ...'); |
41 | 41 | $dirList = glob(MODULE_PATH . '*', GLOB_ONLYDIR); |
42 | 42 | if ($dirList !== false) { |
43 | - self::$list = array_map('basename', $dirList); |
|
43 | + self::$list = array_map('basename', $dirList); |
|
44 | 44 | } |
45 | 45 | if (!empty(self::$list)) { |
46 | 46 | $logger->info('The application contains the module below [' . implode(', ', self::getModuleList()) . ']'); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | public function add($name) { |
58 | 58 | $logger = self::getLogger(); |
59 | 59 | if (in_array($name, self::$list)) { |
60 | - $logger->info('The module [' .$name. '] already added skipping.'); |
|
61 | - return $this; |
|
60 | + $logger->info('The module [' .$name. '] already added skipping.'); |
|
61 | + return $this; |
|
62 | 62 | } |
63 | 63 | self::$list[] = $name; |
64 | 64 | return $this; |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | self::$list = array(); |
89 | 89 | } |
90 | 90 | |
91 | - /** |
|
92 | - * Get the list of module loaded |
|
93 | - * @return array the module list |
|
94 | - */ |
|
91 | + /** |
|
92 | + * Get the list of module loaded |
|
93 | + * @return array the module list |
|
94 | + */ |
|
95 | 95 | public static function getModuleList() { |
96 | 96 | return self::$list; |
97 | 97 | } |
@@ -1,32 +1,32 @@ |
||
1 | 1 | <?php |
2 | 2 | defined('ROOT_PATH') || exit('Access denied'); |
3 | - /** |
|
4 | - * TNH Framework |
|
5 | - * |
|
6 | - * A simple PHP framework using HMVC architecture |
|
7 | - * |
|
8 | - * This content is released under the MIT License (MIT) |
|
9 | - * |
|
10 | - * Copyright (c) 2017 TNH Framework |
|
11 | - * |
|
12 | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
13 | - * of this software and associated documentation files (the "Software"), to deal |
|
14 | - * in the Software without restriction, including without limitation the rights |
|
15 | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
16 | - * copies of the Software, and to permit persons to whom the Software is |
|
17 | - * furnished to do so, subject to the following conditions: |
|
18 | - * |
|
19 | - * The above copyright notice and this permission notice shall be included in all |
|
20 | - * copies or substantial portions of the Software. |
|
21 | - * |
|
22 | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
23 | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
24 | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
25 | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
26 | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
27 | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
28 | - * SOFTWARE. |
|
29 | - */ |
|
3 | + /** |
|
4 | + * TNH Framework |
|
5 | + * |
|
6 | + * A simple PHP framework using HMVC architecture |
|
7 | + * |
|
8 | + * This content is released under the MIT License (MIT) |
|
9 | + * |
|
10 | + * Copyright (c) 2017 TNH Framework |
|
11 | + * |
|
12 | + * Permission is hereby granted, free of charge, to any person obtaining a copy |
|
13 | + * of this software and associated documentation files (the "Software"), to deal |
|
14 | + * in the Software without restriction, including without limitation the rights |
|
15 | + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
16 | + * copies of the Software, and to permit persons to whom the Software is |
|
17 | + * furnished to do so, subject to the following conditions: |
|
18 | + * |
|
19 | + * The above copyright notice and this permission notice shall be included in all |
|
20 | + * copies or substantial portions of the Software. |
|
21 | + * |
|
22 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
23 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
24 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
25 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
26 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
27 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
28 | + * SOFTWARE. |
|
29 | + */ |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @file bootstrap.php |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - defined('ROOT_PATH') || exit('Access denied'); |
|
2 | + defined('ROOT_PATH') || exit('Access denied'); |
|
3 | 3 | /** |
4 | 4 | * TNH Framework |
5 | 5 | * |
@@ -28,68 +28,68 @@ discard block |
||
28 | 28 | * SOFTWARE. |
29 | 29 | */ |
30 | 30 | |
31 | - class Browser { |
|
32 | - |
|
33 | - /** |
|
34 | - * List of know platforms |
|
35 | - * @var array |
|
36 | - */ |
|
37 | - private $_platforms = array( |
|
38 | - '/windows nt 10/i' => 'Windows 10', |
|
39 | - '/windows phone 10/i' => 'Windows Phone 10', |
|
40 | - '/windows phone 8.1/i' => 'Windows Phone 8.1', |
|
41 | - '/windows phone 8/i' => 'Windows Phone 8', |
|
42 | - '/windows nt 6.3/i' => 'Windows 8.1', |
|
43 | - '/windows nt 6.2/i' => 'Windows 8', |
|
44 | - '/windows nt 6.1/i' => 'Windows 7', |
|
45 | - '/windows nt 6.0/i' => 'Windows Vista', |
|
46 | - '/windows nt 5.2/i' => 'Windows Server 2003/XP x64', |
|
47 | - '/windows nt 5.1/i' => 'Windows XP', |
|
48 | - '/windows xp/i' => 'Windows XP', |
|
49 | - '/windows nt 5.0/i' => 'Windows 2000', |
|
50 | - '/windows me/i' => 'Windows ME', |
|
51 | - '/win98/i' => 'Windows 98', |
|
52 | - '/win95/i' => 'Windows 95', |
|
53 | - '/win16/i' => 'Windows 3.11', |
|
54 | - '/ipad/i' => 'iPad', |
|
31 | + class Browser { |
|
32 | + |
|
33 | + /** |
|
34 | + * List of know platforms |
|
35 | + * @var array |
|
36 | + */ |
|
37 | + private $_platforms = array( |
|
38 | + '/windows nt 10/i' => 'Windows 10', |
|
39 | + '/windows phone 10/i' => 'Windows Phone 10', |
|
40 | + '/windows phone 8.1/i' => 'Windows Phone 8.1', |
|
41 | + '/windows phone 8/i' => 'Windows Phone 8', |
|
42 | + '/windows nt 6.3/i' => 'Windows 8.1', |
|
43 | + '/windows nt 6.2/i' => 'Windows 8', |
|
44 | + '/windows nt 6.1/i' => 'Windows 7', |
|
45 | + '/windows nt 6.0/i' => 'Windows Vista', |
|
46 | + '/windows nt 5.2/i' => 'Windows Server 2003/XP x64', |
|
47 | + '/windows nt 5.1/i' => 'Windows XP', |
|
48 | + '/windows xp/i' => 'Windows XP', |
|
49 | + '/windows nt 5.0/i' => 'Windows 2000', |
|
50 | + '/windows me/i' => 'Windows ME', |
|
51 | + '/win98/i' => 'Windows 98', |
|
52 | + '/win95/i' => 'Windows 95', |
|
53 | + '/win16/i' => 'Windows 3.11', |
|
54 | + '/ipad/i' => 'iPad', |
|
55 | 55 | '/ipod/i' => 'iPod', |
56 | 56 | '/iphone/i' => 'iPhone', |
57 | 57 | '/macintosh|mac os x/i' => 'Mac OS X', |
58 | - '/mac_powerpc/i' => 'Mac OS 9', |
|
59 | - '/android/i' => 'Android', |
|
60 | - '/ubuntu/i' => 'Ubuntu', |
|
61 | - '/linux/i' => 'Linux', |
|
62 | - '/blackberry/i' => 'BlackBerry', |
|
63 | - '/webos/i' => 'Mobile' |
|
64 | - ); |
|
65 | - |
|
66 | - /** |
|
67 | - * List of know browsers |
|
68 | - * @var array |
|
69 | - */ |
|
70 | - private $_browsers = array( |
|
71 | - '/mobile/i' => 'Handheld Browser', |
|
72 | - '/msie/i' => 'Internet Explorer', |
|
73 | - '/firefox/i' => 'Firefox', |
|
74 | - '/chrome/i' => 'Chrome', |
|
75 | - '/safari/i' => 'Safari', |
|
76 | - '/edge/i' => 'Edge', |
|
77 | - '/opera/i' => 'Opera', |
|
78 | - '/netscape/i' => 'Netscape', |
|
79 | - '/maxthon/i' => 'Maxthon', |
|
80 | - '/konqueror/i' => 'Konqueror' |
|
81 | - ); |
|
82 | - |
|
83 | - /** |
|
84 | - * Agent string |
|
85 | - * @var string |
|
86 | - */ |
|
87 | - private $_agent = ''; |
|
88 | - |
|
89 | - /** |
|
90 | - * Browser name |
|
91 | - * @var string |
|
92 | - */ |
|
58 | + '/mac_powerpc/i' => 'Mac OS 9', |
|
59 | + '/android/i' => 'Android', |
|
60 | + '/ubuntu/i' => 'Ubuntu', |
|
61 | + '/linux/i' => 'Linux', |
|
62 | + '/blackberry/i' => 'BlackBerry', |
|
63 | + '/webos/i' => 'Mobile' |
|
64 | + ); |
|
65 | + |
|
66 | + /** |
|
67 | + * List of know browsers |
|
68 | + * @var array |
|
69 | + */ |
|
70 | + private $_browsers = array( |
|
71 | + '/mobile/i' => 'Handheld Browser', |
|
72 | + '/msie/i' => 'Internet Explorer', |
|
73 | + '/firefox/i' => 'Firefox', |
|
74 | + '/chrome/i' => 'Chrome', |
|
75 | + '/safari/i' => 'Safari', |
|
76 | + '/edge/i' => 'Edge', |
|
77 | + '/opera/i' => 'Opera', |
|
78 | + '/netscape/i' => 'Netscape', |
|
79 | + '/maxthon/i' => 'Maxthon', |
|
80 | + '/konqueror/i' => 'Konqueror' |
|
81 | + ); |
|
82 | + |
|
83 | + /** |
|
84 | + * Agent string |
|
85 | + * @var string |
|
86 | + */ |
|
87 | + private $_agent = ''; |
|
88 | + |
|
89 | + /** |
|
90 | + * Browser name |
|
91 | + * @var string |
|
92 | + */ |
|
93 | 93 | private $_browser_name = ''; |
94 | 94 | |
95 | 95 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private $_is_facebook = false; |
130 | 130 | |
131 | - /** |
|
131 | + /** |
|
132 | 132 | * Class constructor |
133 | 133 | */ |
134 | 134 | public function __construct($userAgent = '') { |
@@ -255,12 +255,12 @@ discard block |
||
255 | 255 | return $this->_is_facebook; |
256 | 256 | } |
257 | 257 | |
258 | - /** |
|
259 | - * Returns a formatted string with a summary of the details of the browser. |
|
260 | - * @codeCoverageIgnore |
|
261 | - * |
|
262 | - * @return string formatted string with a summary of the browser |
|
263 | - */ |
|
258 | + /** |
|
259 | + * Returns a formatted string with a summary of the details of the browser. |
|
260 | + * @codeCoverageIgnore |
|
261 | + * |
|
262 | + * @return string formatted string with a summary of the browser |
|
263 | + */ |
|
264 | 264 | public function __toString() { |
265 | 265 | return "<strong>Browser Name:</strong> {$this->getBrowser()}<br/>\n" . |
266 | 266 | "<strong>Browser Version:</strong> {$this->getVersion()}<br/>\n" . |
@@ -304,69 +304,69 @@ discard block |
||
304 | 304 | /** |
305 | 305 | * Determine the user's platform |
306 | 306 | */ |
307 | - protected function checkPlatform() { |
|
308 | - foreach ($this->_platforms as $regex => $value) { |
|
309 | - if (preg_match($regex, $this->_agent) ) { |
|
310 | - $this->setPlatform($value); |
|
311 | - break; |
|
312 | - } |
|
313 | - } |
|
314 | - } |
|
307 | + protected function checkPlatform() { |
|
308 | + foreach ($this->_platforms as $regex => $value) { |
|
309 | + if (preg_match($regex, $this->_agent) ) { |
|
310 | + $this->setPlatform($value); |
|
311 | + break; |
|
312 | + } |
|
313 | + } |
|
314 | + } |
|
315 | 315 | |
316 | - /** |
|
316 | + /** |
|
317 | 317 | * Routine to determine the browser type |
318 | 318 | */ |
319 | - protected function checkBrowser() { |
|
320 | - foreach ($this->_browsers as $regex => $value) { |
|
321 | - if (preg_match($regex, $this->_agent ) ) { |
|
322 | - $this->setBrowser($value); |
|
323 | - break; |
|
324 | - } |
|
325 | - } |
|
326 | - } |
|
319 | + protected function checkBrowser() { |
|
320 | + foreach ($this->_browsers as $regex => $value) { |
|
321 | + if (preg_match($regex, $this->_agent ) ) { |
|
322 | + $this->setBrowser($value); |
|
323 | + break; |
|
324 | + } |
|
325 | + } |
|
326 | + } |
|
327 | 327 | |
328 | - /** |
|
328 | + /** |
|
329 | 329 | * Routine to determine the browser version |
330 | 330 | */ |
331 | - protected function checkBrowserVersion(){ |
|
332 | - $detected = $this->getBrowser(); |
|
333 | - $d = array_search($detected, $this->_browsers); |
|
334 | - $browser = str_replace(array("/i","/"), "", $d); |
|
335 | - $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i"; |
|
336 | - if (preg_match_all($regex, $this->_agent, $matches)) { |
|
337 | - $found = array_search($browser, $matches["browser"]); |
|
338 | - $this->setVersion($matches["version"][$found]); |
|
339 | - } |
|
340 | - } |
|
341 | - |
|
342 | - /** |
|
331 | + protected function checkBrowserVersion(){ |
|
332 | + $detected = $this->getBrowser(); |
|
333 | + $d = array_search($detected, $this->_browsers); |
|
334 | + $browser = str_replace(array("/i","/"), "", $d); |
|
335 | + $regex = "/(?<browser>version|{$browser})[\/]+(?<version>[0-9.|a-zA-Z.]*)/i"; |
|
336 | + if (preg_match_all($regex, $this->_agent, $matches)) { |
|
337 | + $found = array_search($browser, $matches["browser"]); |
|
338 | + $this->setVersion($matches["version"][$found]); |
|
339 | + } |
|
340 | + } |
|
341 | + |
|
342 | + /** |
|
343 | 343 | * Determine if the browser is Mobile or not |
344 | 344 | */ |
345 | - protected function checkMobile() { |
|
346 | - if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent) ) { |
|
347 | - $this->setMobile(true); |
|
348 | - } |
|
349 | - } |
|
345 | + protected function checkMobile() { |
|
346 | + if (preg_match('/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i', $this->_agent) ) { |
|
347 | + $this->setMobile(true); |
|
348 | + } |
|
349 | + } |
|
350 | 350 | |
351 | - /** |
|
351 | + /** |
|
352 | 352 | * Determine if the browser is Tablet or not |
353 | 353 | */ |
354 | - protected function checkTablet() { |
|
355 | - if (preg_match('/tablet|ipad/i', $this->_agent) ) { |
|
356 | - $this->setTablet(true); |
|
357 | - } |
|
358 | - } |
|
354 | + protected function checkTablet() { |
|
355 | + if (preg_match('/tablet|ipad/i', $this->_agent) ) { |
|
356 | + $this->setTablet(true); |
|
357 | + } |
|
358 | + } |
|
359 | 359 | |
360 | - /** |
|
360 | + /** |
|
361 | 361 | * Determine if the browser is Robot or not |
362 | 362 | */ |
363 | - protected function checkBot() { |
|
364 | - if (preg_match('/bot/i', $this->_agent) ) { |
|
365 | - $this->setRobot(true); |
|
366 | - } |
|
367 | - } |
|
363 | + protected function checkBot() { |
|
364 | + if (preg_match('/bot/i', $this->_agent) ) { |
|
365 | + $this->setRobot(true); |
|
366 | + } |
|
367 | + } |
|
368 | 368 | |
369 | - /** |
|
369 | + /** |
|
370 | 370 | * Detect if URL is loaded from FacebookExternalHit |
371 | 371 | */ |
372 | 372 | protected function checkFacebook() { |
@@ -379,10 +379,10 @@ discard block |
||
379 | 379 | } |
380 | 380 | |
381 | 381 | |
382 | - /** |
|
383 | - * Protected routine to calculate and determine what |
|
384 | - * the browser is in use (including platform) |
|
385 | - */ |
|
382 | + /** |
|
383 | + * Protected routine to calculate and determine what |
|
384 | + * the browser is in use (including platform) |
|
385 | + */ |
|
386 | 386 | protected function determine() { |
387 | 387 | $this->checkPlatform(); |
388 | 388 | $this->checkBrowser(); |
@@ -393,4 +393,4 @@ discard block |
||
393 | 393 | $this->checkFacebook(); |
394 | 394 | } |
395 | 395 | |
396 | - } |
|
396 | + } |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | |
31 | 31 | /** |
32 | - * DB session handler model class |
|
33 | - */ |
|
32 | + * DB session handler model class |
|
33 | + */ |
|
34 | 34 | abstract class DBSessionHandlerModel extends Model { |
35 | 35 | |
36 | 36 | /** |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | class DatabaseQueryRunner extends BaseClass { |
32 | 32 | |
33 | - /** |
|
34 | - * The DatabaseConnection instance |
|
35 | - * @var object |
|
36 | - */ |
|
33 | + /** |
|
34 | + * The DatabaseConnection instance |
|
35 | + * @var object |
|
36 | + */ |
|
37 | 37 | private $connection = null; |
38 | 38 | |
39 | 39 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | //by default count() return 1 if the parameter is not an array |
187 | 187 | //object or object implements Countable. |
188 | 188 | if (is_array($result) || is_object($result) || $result instanceof Countable) { |
189 | - $numRows = count($result); |
|
189 | + $numRows = count($result); |
|
190 | 190 | } |
191 | 191 | } else { |
192 | 192 | $numRows = $this->pdoStatment->rowCount(); |
@@ -387,9 +387,9 @@ discard block |
||
387 | 387 | $this->queryCount++; |
388 | 388 | |
389 | 389 | $queryResult = $this->queryRunner->setQuery($query) |
390 | - ->setReturnType($returnAsList) |
|
391 | - ->setReturnAsArray($returnAsArray) |
|
392 | - ->execute(); |
|
390 | + ->setReturnType($returnAsList) |
|
391 | + ->setReturnAsArray($returnAsArray) |
|
392 | + ->execute(); |
|
393 | 393 | |
394 | 394 | if (is_object($queryResult)) { |
395 | 395 | $this->result = $queryResult->getResult(); |
@@ -405,11 +405,11 @@ discard block |
||
405 | 405 | return $this->result; |
406 | 406 | } |
407 | 407 | |
408 | - /** |
|
409 | - * Set the connection instance using database configuration file |
|
410 | - * |
|
411 | - * @return object|void |
|
412 | - */ |
|
408 | + /** |
|
409 | + * Set the connection instance using database configuration file |
|
410 | + * |
|
411 | + * @return object|void |
|
412 | + */ |
|
413 | 413 | protected function setConnectionUsingConfigFile(){ |
414 | 414 | $dbConfigFromFile = $this->getDatabaseConfigFromFile(); |
415 | 415 | $connection = &class_loader('DatabaseConnection', 'classes/database'); |
@@ -422,7 +422,6 @@ discard block |
||
422 | 422 | |
423 | 423 | /** |
424 | 424 | * Get the database configuration using the configuration file |
425 | - |
|
426 | 425 | * @return array the database configuration from file |
427 | 426 | */ |
428 | 427 | protected function getDatabaseConfigFromFile() { |
@@ -42,28 +42,28 @@ discard block |
||
42 | 42 | */ |
43 | 43 | private $driver = null; |
44 | 44 | |
45 | - /** |
|
46 | - * The database hostname |
|
47 | - * @var string |
|
48 | - */ |
|
45 | + /** |
|
46 | + * The database hostname |
|
47 | + * @var string |
|
48 | + */ |
|
49 | 49 | private $hostname = null; |
50 | 50 | |
51 | - /** |
|
52 | - * The database port |
|
53 | - * @var integer |
|
54 | - */ |
|
51 | + /** |
|
52 | + * The database port |
|
53 | + * @var integer |
|
54 | + */ |
|
55 | 55 | private $port = null; |
56 | 56 | |
57 | - /** |
|
58 | - * The database username |
|
59 | - * @var string |
|
60 | - */ |
|
57 | + /** |
|
58 | + * The database username |
|
59 | + * @var string |
|
60 | + */ |
|
61 | 61 | private $username = null; |
62 | 62 | |
63 | - /** |
|
64 | - * The database password |
|
65 | - * @var string |
|
66 | - */ |
|
63 | + /** |
|
64 | + * The database password |
|
65 | + * @var string |
|
66 | + */ |
|
67 | 67 | private $password = null; |
68 | 68 | |
69 | 69 | /** |
@@ -72,10 +72,10 @@ discard block |
||
72 | 72 | */ |
73 | 73 | private $databaseName = null; |
74 | 74 | |
75 | - /** |
|
76 | - * The database charset |
|
77 | - * @var string |
|
78 | - */ |
|
75 | + /** |
|
76 | + * The database charset |
|
77 | + * @var string |
|
78 | + */ |
|
79 | 79 | private $charset = null; |
80 | 80 | |
81 | 81 | /** |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | */ |
85 | 85 | private $collation = null; |
86 | 86 | |
87 | - /** |
|
88 | - * The database tables prefix |
|
89 | - * @var string |
|
90 | - */ |
|
87 | + /** |
|
88 | + * The database tables prefix |
|
89 | + * @var string |
|
90 | + */ |
|
91 | 91 | private $prefix = null; |
92 | 92 | |
93 | 93 | /** |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
117 | - /** |
|
118 | - * This is method is used to connect to database |
|
119 | - * |
|
120 | - * @return boolean true in case of successfully connection false if error |
|
121 | - */ |
|
117 | + /** |
|
118 | + * This is method is used to connect to database |
|
119 | + * |
|
120 | + * @return boolean true in case of successfully connection false if error |
|
121 | + */ |
|
122 | 122 | public function connect() { |
123 | 123 | try { |
124 | 124 | $this->pdo = new PDO($this->getDsnValue(), $this->getUsername(), $this->getPassword()); |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $this->populatePropertiesFromConfig(); |
410 | 410 | |
411 | 411 | if (!empty($this->config)) { |
412 | - //For logging |
|
412 | + //For logging |
|
413 | 413 | $configInfo = $this->config; |
414 | 414 | //Hide password from log |
415 | 415 | $configInfo['password'] = string_hidden($this->getPassword()); |
@@ -418,11 +418,11 @@ discard block |
||
418 | 418 | return $this; |
419 | 419 | } |
420 | 420 | |
421 | - /** |
|
422 | - * Update the properties using the current database configuration |
|
423 | - * |
|
424 | - * @return object the current instance |
|
425 | - */ |
|
421 | + /** |
|
422 | + * Update the properties using the current database configuration |
|
423 | + * |
|
424 | + * @return object the current instance |
|
425 | + */ |
|
426 | 426 | protected function populatePropertiesFromConfig() { |
427 | 427 | foreach ($this->config as $key => $value) { |
428 | 428 | $setter = 'set' . ucfirst($key); |