1 | <?php |
||
36 | class Database implements DatabaseInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The database identifier for this database connection. |
||
41 | * |
||
42 | * @var string |
||
43 | * @Type("string") |
||
44 | * @SerializedName("id") |
||
45 | */ |
||
46 | protected $id; |
||
47 | |||
48 | /** |
||
49 | * The PDO DSN to use. |
||
50 | * |
||
51 | * @var string |
||
52 | * @Type("string") |
||
53 | * @SerializedName("pdo-dsn") |
||
54 | */ |
||
55 | protected $dsn; |
||
56 | |||
57 | /** |
||
58 | * The DB username to use. |
||
59 | * |
||
60 | * @var string |
||
61 | * @Type("string") |
||
62 | */ |
||
63 | protected $username; |
||
64 | |||
65 | /** |
||
66 | * The DB password to use. |
||
67 | * |
||
68 | * @var string |
||
69 | * @Type("string") |
||
70 | */ |
||
71 | protected $password; |
||
72 | |||
73 | /** |
||
74 | * The flag to signal the default datasource or not. |
||
75 | * |
||
76 | * @var boolean |
||
77 | * @Type("boolean") |
||
78 | * @SerializedName("default") |
||
79 | */ |
||
80 | protected $default = false; |
||
81 | |||
82 | /** |
||
83 | * Set's the database identifier for this database connection. |
||
84 | * |
||
85 | * @param string $id The database identifier |
||
86 | * |
||
87 | * @return void |
||
88 | */ |
||
89 | public function setId($id) |
||
93 | |||
94 | /** |
||
95 | * Return's the database identifier for this database connection. |
||
96 | * |
||
97 | * @return string The database identifier |
||
98 | */ |
||
99 | public function getId() |
||
103 | |||
104 | /** |
||
105 | * Set's the PDO DSN to use. |
||
106 | * |
||
107 | * @param string $dsn The PDO DSN |
||
108 | * |
||
109 | * @return void |
||
110 | */ |
||
111 | public function setDsn($dsn) |
||
115 | |||
116 | /** |
||
117 | * Return's the PDO DSN to use. |
||
118 | * |
||
119 | * @return string The PDO DSN |
||
120 | */ |
||
121 | public function getDsn() |
||
125 | |||
126 | /** |
||
127 | * Set's the DB username to use. |
||
128 | * |
||
129 | * @param string $username The DB username |
||
130 | * |
||
131 | * @return void |
||
132 | */ |
||
133 | public function setUsername($username) |
||
137 | |||
138 | /** |
||
139 | * Return's the DB username to use. |
||
140 | * |
||
141 | * @return string The DB username |
||
142 | */ |
||
143 | public function getUsername() |
||
147 | |||
148 | /** |
||
149 | * Set's the DB password to use. |
||
150 | * |
||
151 | * @param string $password The DB password |
||
152 | * |
||
153 | * @return void |
||
154 | */ |
||
155 | public function setPassword($password) |
||
159 | |||
160 | /** |
||
161 | * Return's the DB password to use. |
||
162 | * |
||
163 | * @return string The DB password |
||
164 | */ |
||
165 | public function getPassword() |
||
169 | |||
170 | /** |
||
171 | * Set's the flag to signal that this is the default datasource or not. |
||
172 | * |
||
173 | * @param boolean $default TRUE if this is the default datasource, else FALSE |
||
174 | * |
||
175 | * @return void |
||
176 | */ |
||
177 | public function setDefault($default) |
||
181 | |||
182 | /** |
||
183 | * Return's the flag to signal that this is the default datasource or not. |
||
184 | * |
||
185 | * @return boolean TRUE if this is the default datasource, else FALSE |
||
186 | */ |
||
187 | public function isDefault() |
||
191 | } |
||
192 |