1 | <?php |
||
36 | class Database implements DatabaseConfigurationInterface |
||
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 database host to use. |
||
59 | * |
||
60 | * @var string |
||
61 | * @Type("string") |
||
62 | */ |
||
63 | protected $host; |
||
64 | |||
65 | /** |
||
66 | * The database port to use. |
||
67 | * |
||
68 | * @var string |
||
69 | * @Type("integer") |
||
70 | */ |
||
71 | protected $port; |
||
72 | |||
73 | /** |
||
74 | * The DB username to use. |
||
75 | * |
||
76 | * @var string |
||
77 | * @Type("string") |
||
78 | */ |
||
79 | protected $username; |
||
80 | |||
81 | /** |
||
82 | * The DB password to use. |
||
83 | * |
||
84 | * @var string |
||
85 | * @Type("string") |
||
86 | */ |
||
87 | protected $password; |
||
88 | |||
89 | /** |
||
90 | * The flag to signal the default datasource or not. |
||
91 | * |
||
92 | * @var boolean |
||
93 | * @Type("boolean") |
||
94 | * @SerializedName("default") |
||
95 | */ |
||
96 | protected $default = false; |
||
97 | |||
98 | /** |
||
99 | * The DB timeout to use. |
||
100 | * |
||
101 | * @var integer |
||
102 | * @Type("integer") |
||
103 | */ |
||
104 | protected $timeout; |
||
105 | |||
106 | /** |
||
107 | * The DB version to use. |
||
108 | * |
||
109 | * @var string |
||
110 | * @Type("string") |
||
111 | */ |
||
112 | protected $version; |
||
113 | |||
114 | /** |
||
115 | * The DB name to use. |
||
116 | * |
||
117 | * @var string |
||
118 | * @Type("string") |
||
119 | */ |
||
120 | protected $name; |
||
121 | |||
122 | /** |
||
123 | * Set's the database identifier for this database connection. |
||
124 | * |
||
125 | * @param string $id The database identifier |
||
126 | * |
||
127 | * @return void |
||
128 | */ |
||
129 | public function setId($id) |
||
133 | |||
134 | /** |
||
135 | * Return's the database identifier for this database connection. |
||
136 | * |
||
137 | * @return string The database identifier |
||
138 | */ |
||
139 | public function getId() |
||
143 | |||
144 | /** |
||
145 | * Set's the PDO DSN to use. |
||
146 | * |
||
147 | * @param string $dsn The PDO DSN |
||
148 | * |
||
149 | * @return void |
||
150 | */ |
||
151 | public function setDsn($dsn) |
||
155 | |||
156 | /** |
||
157 | * Return's the PDO DSN to use. |
||
158 | * |
||
159 | * @return string The PDO DSN |
||
160 | */ |
||
161 | public function getDsn() |
||
165 | |||
166 | /** |
||
167 | * Set's the DB username to use. |
||
168 | * |
||
169 | * @param string $username The DB username |
||
170 | * |
||
171 | * @return void |
||
172 | */ |
||
173 | public function setUsername($username) |
||
177 | |||
178 | /** |
||
179 | * Return's the DB username to use. |
||
180 | * |
||
181 | * @return string The DB username |
||
182 | */ |
||
183 | public function getUsername() |
||
187 | |||
188 | /** |
||
189 | * Set's the DB password to use. |
||
190 | * |
||
191 | * @param string $password The DB password |
||
192 | * |
||
193 | * @return void |
||
194 | */ |
||
195 | public function setPassword($password) |
||
199 | |||
200 | /** |
||
201 | * Return's the DB password to use. |
||
202 | * |
||
203 | * @return string The DB password |
||
204 | */ |
||
205 | public function getPassword() |
||
209 | |||
210 | /** |
||
211 | * Set's the flag to signal that this is the default datasource or not. |
||
212 | * |
||
213 | * @param boolean $default TRUE if this is the default datasource, else FALSE |
||
214 | * |
||
215 | * @return void |
||
216 | */ |
||
217 | public function setDefault($default) |
||
221 | |||
222 | /** |
||
223 | * Return's the flag to signal that this is the default datasource or not. |
||
224 | * |
||
225 | * @return boolean TRUE if this is the default datasource, else FALSE |
||
226 | */ |
||
227 | public function isDefault() |
||
231 | |||
232 | /** |
||
233 | * Return's the DB name to use. |
||
234 | * |
||
235 | * @return string The DB name |
||
236 | */ |
||
237 | public function getName() |
||
241 | |||
242 | /** |
||
243 | * Return's the DB timeout to use. |
||
244 | * |
||
245 | * @return integer The DB timeout |
||
246 | */ |
||
247 | public function getTimeout() |
||
251 | |||
252 | /** |
||
253 | * Return's the DB version to use. |
||
254 | * |
||
255 | * @return string The DB version |
||
256 | */ |
||
257 | public function getVersion() |
||
261 | |||
262 | /** |
||
263 | * Return's the DB host to use. |
||
264 | * |
||
265 | * @return string The DB host |
||
266 | */ |
||
267 | public function getHost() |
||
271 | |||
272 | /** |
||
273 | * Return's the DB port to use. |
||
274 | * |
||
275 | * @return integer The DB port |
||
276 | */ |
||
277 | public function getPort() |
||
281 | } |
||
282 |