Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
36 | public function __construct($dbConfig) { |
||
37 | static::$instance = $this; |
||
38 | |||
39 | $errorLevel = error_reporting(0); |
||
40 | $this->pdo = new PDO('mysql:host=' . $dbConfig['host'] . ';dbname=' . $dbConfig['dbname'], $dbConfig['user'], $dbConfig['pass']); |
||
41 | error_reporting($errorLevel); |
||
42 | |||
43 | $this->validateConnection(); |
||
44 | } |
||
45 | |||
55 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.