1 | <?php |
||
14 | class DataBaseConnection extends PDO |
||
15 | { |
||
16 | private $servername; |
||
17 | private $username; |
||
18 | private $password; |
||
19 | private $driver; |
||
20 | private $dbname; |
||
21 | |||
22 | /** |
||
23 | * This is a constructor; a default method that will be called automatically during class instantiation. |
||
24 | */ |
||
25 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * This method determines the driver to be used for appropriate database server. |
||
45 | * |
||
46 | * |
||
47 | * @return string dsn |
||
48 | */ |
||
49 | public function getDataBaseDriver() |
||
65 | |||
66 | /** |
||
67 | * Load Dotenv to grant getenv() access to environment variables in .env file. |
||
68 | */ |
||
69 | private function loadEnv() |
||
74 | } |
||
75 |