1 | <?php |
||
10 | class DatabaseConnection |
||
11 | { |
||
12 | private $capsule; |
||
13 | |||
14 | /** |
||
15 | * This constructor accept Capsule; a connection |
||
16 | * string for connecting to the database. |
||
17 | * |
||
18 | * @param $capsule |
||
19 | */ |
||
20 | public function __construct($capsule) |
||
26 | |||
27 | /** |
||
28 | * This method setup the PDO database connection and also |
||
29 | * start the database connection. |
||
30 | */ |
||
31 | private function setUpDatabase() |
||
50 | |||
51 | /** |
||
52 | * Load Dotenv to grant getenv() access to |
||
53 | * environment variables in .env file. |
||
54 | */ |
||
55 | public static function loadEnv() |
||
62 | } |
||
63 |