@@ -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 | /** |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | - /** |
|
117 | - * This is method is used to connect to database |
|
118 | - * |
|
119 | - * @return boolean true in case of successfully connection false if error |
|
120 | - */ |
|
116 | + /** |
|
117 | + * This is method is used to connect to database |
|
118 | + * |
|
119 | + * @return boolean true in case of successfully connection false if error |
|
120 | + */ |
|
121 | 121 | public function connect() { |
122 | 122 | try { |
123 | 123 | $options = array( |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | ); |
177 | 177 | if ($port) { |
178 | 178 | $driversPort = array( |
179 | - 'mysql' => 'port=' . $port . ';', |
|
180 | - 'pgsql' => 'port=' . $port . ';', |
|
181 | - 'oracle' => ':' . $port |
|
179 | + 'mysql' => 'port=' . $port . ';', |
|
180 | + 'pgsql' => 'port=' . $port . ';', |
|
181 | + 'oracle' => ':' . $port |
|
182 | 182 | ); |
183 | 183 | if (isset($driversPort[$driver])) { |
184 | 184 | $port = $driversPort[$driver]; |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | $this->populatePropertiesFromConfig(); |
417 | 417 | |
418 | 418 | if (!empty($this->config)) { |
419 | - //For logging |
|
419 | + //For logging |
|
420 | 420 | $configInfo = $this->config; |
421 | 421 | //Hide password from log |
422 | 422 | $configInfo['password'] = string_hidden($this->getPassword()); |
@@ -425,11 +425,10 @@ discard block |
||
425 | 425 | return $this; |
426 | 426 | } |
427 | 427 | |
428 | - /** |
|
429 | - * Get the database configuration using the configuration file |
|
430 | - |
|
431 | - * @return array the database configuration from file |
|
432 | - */ |
|
428 | + /** |
|
429 | + * Get the database configuration using the configuration file |
|
430 | + * @return array the database configuration from file |
|
431 | + */ |
|
433 | 432 | public function getDatabaseConfigFromFile() { |
434 | 433 | $db = array(); |
435 | 434 | if (file_exists(CONFIG_PATH . 'database.php')) { |
@@ -440,11 +439,11 @@ discard block |
||
440 | 439 | return $db; |
441 | 440 | } |
442 | 441 | |
443 | - /** |
|
444 | - * Update the properties using the current database configuration |
|
445 | - * |
|
446 | - * @return object the current instance |
|
447 | - */ |
|
442 | + /** |
|
443 | + * Update the properties using the current database configuration |
|
444 | + * |
|
445 | + * @return object the current instance |
|
446 | + */ |
|
448 | 447 | protected function populatePropertiesFromConfig() { |
449 | 448 | foreach ($this->config as $key => $value) { |
450 | 449 | $setter = 'set' . ucfirst($key); |