1 | <?php |
||
28 | class ClientLocal implements RequestsInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var BaseTableGateway[] |
||
32 | */ |
||
33 | protected $tableGateways = []; |
||
34 | |||
35 | /** |
||
36 | * @var Connection |
||
37 | */ |
||
38 | protected $connection = null; |
||
39 | |||
40 | /** |
||
41 | * ClientLocal constructor. |
||
42 | * |
||
43 | * @param $connection |
||
44 | */ |
||
45 | public function __construct($connection) |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public function getTables(array $params = []) |
||
57 | |||
58 | /** |
||
59 | * @inheritDoc |
||
60 | */ |
||
61 | public function getTable($tableName) |
||
65 | |||
66 | /** |
||
67 | * @inheritDoc |
||
68 | */ |
||
69 | public function getColumns($tableName, array $params = []) |
||
73 | |||
74 | /** |
||
75 | * @inheritDoc |
||
76 | */ |
||
77 | public function getColumn($tableName, $columnName) |
||
81 | |||
82 | /** |
||
83 | * @inheritDoc |
||
84 | */ |
||
85 | public function getEntries($tableName, array $params = []) |
||
91 | |||
92 | /** |
||
93 | * @inheritDoc |
||
94 | */ |
||
95 | public function getEntry($tableName, $id, array $params = []) |
||
102 | |||
103 | /** |
||
104 | * @inheritDoc |
||
105 | */ |
||
106 | public function getUsers(array $params = []) |
||
111 | |||
112 | /** |
||
113 | * @inheritDoc |
||
114 | */ |
||
115 | public function getUser($id, array $params = []) |
||
119 | |||
120 | /** |
||
121 | * @inheritDoc |
||
122 | */ |
||
123 | public function getGroups(array $params = []) |
||
127 | |||
128 | /** |
||
129 | * @inheritDoc |
||
130 | */ |
||
131 | public function getGroup($id, array $params = []) |
||
135 | |||
136 | /** |
||
137 | * @inheritDoc |
||
138 | */ |
||
139 | public function getGroupPrivileges($groupID) |
||
147 | |||
148 | /** |
||
149 | * @inheritDoc |
||
150 | */ |
||
151 | public function getFiles(array $params = []) |
||
155 | |||
156 | /** |
||
157 | * @inheritDoc |
||
158 | */ |
||
159 | public function getFile($id, array $params = []) |
||
163 | |||
164 | /** |
||
165 | * @inheritDoc |
||
166 | */ |
||
167 | public function getSettings() |
||
171 | |||
172 | /** |
||
173 | * @inheritDoc |
||
174 | */ |
||
175 | public function getSettingsByCollection($collectionName) |
||
183 | |||
184 | /** |
||
185 | * @inheritDoc |
||
186 | */ |
||
187 | public function getMessages($userId) |
||
194 | |||
195 | /** |
||
196 | * @inheritDoc |
||
197 | */ |
||
198 | public function createEntry($tableName, array $data) |
||
205 | |||
206 | /** |
||
207 | * @inheritDoc |
||
208 | */ |
||
209 | public function updateEntry($tableName, $id, array $data) |
||
216 | |||
217 | /** |
||
218 | * @inheritDoc |
||
219 | */ |
||
220 | public function deleteEntry($tableName, $ids) |
||
233 | |||
234 | /** |
||
235 | * @inheritDoc |
||
236 | */ |
||
237 | public function createUser(array $data) |
||
241 | |||
242 | /** |
||
243 | * @inheritDoc |
||
244 | */ |
||
245 | public function updateUser($id, array $data) |
||
249 | |||
250 | /** |
||
251 | * @inheritDoc |
||
252 | */ |
||
253 | public function deleteUser($ids) |
||
257 | |||
258 | /** |
||
259 | * @inheritDoc |
||
260 | */ |
||
261 | public function createFile(array $data) |
||
265 | |||
266 | /** |
||
267 | * @inheritDoc |
||
268 | */ |
||
269 | public function updateFile($id, array $data) |
||
273 | |||
274 | /** |
||
275 | * @inheritDoc |
||
276 | */ |
||
277 | public function deleteFile($ids) |
||
281 | |||
282 | |||
283 | /** |
||
284 | * Get a table gateway for the given table name |
||
285 | * |
||
286 | * @param $tableName |
||
287 | * |
||
288 | * @return RelationalTableGateway |
||
289 | */ |
||
290 | protected function getTableGateway($tableName) |
||
299 | |||
300 | // @TODO: move to a builder class |
||
301 | protected function createResponseFromData($data) |
||
311 | } |
||
312 |