1 | <?php |
||
9 | trait LoadEnvVariablesTrait |
||
10 | { |
||
11 | /** |
||
12 | * $_database The database name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | private $_database; |
||
17 | |||
18 | /** |
||
19 | * $_host The host name. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | private $_host; |
||
24 | |||
25 | /** |
||
26 | * $_password The password to the database server. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | private $_password; |
||
31 | |||
32 | /** |
||
33 | * $_pdo The PDO instance of the connection. |
||
34 | * |
||
35 | * @var PDO |
||
36 | */ |
||
37 | private $_pdo; |
||
38 | |||
39 | /** |
||
40 | * $_port The port number to the database server. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | private $_port; |
||
45 | |||
46 | /** |
||
47 | * The username to the database server. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | private $_username; |
||
52 | |||
53 | /** |
||
54 | * Loads variables in the .env file. |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | private function loadDbEnv() |
||
71 | |||
72 | /** |
||
73 | * Loads variables in the .env file and handles exceptions. |
||
74 | * |
||
75 | * @return void |
||
76 | */ |
||
77 | private function useDbEnv() |
||
85 | } |