@@ 303-313 (lines=11) @@ | ||
300 | * @param string $id |
|
301 | * @param array $row |
|
302 | */ |
|
303 | protected function insert(string $id, array $row) |
|
304 | { |
|
305 | $table = $this->getTable(); |
|
306 | ||
307 | $this->logger->info( |
|
308 | 'model: insert row into table {table} with id {id}', |
|
309 | ['table' => $table, 'id' => $id] |
|
310 | ); |
|
311 | ||
312 | $this->connection->insert($table, $row); |
|
313 | } |
|
314 | ||
315 | /** |
|
316 | * @param string $id |
|
@@ 319-329 (lines=11) @@ | ||
316 | * @param string $id |
|
317 | * @param array $row |
|
318 | */ |
|
319 | protected function update(string $id, array $row) |
|
320 | { |
|
321 | $table = $this->getTable(); |
|
322 | ||
323 | $this->logger->info( |
|
324 | 'model: update row from table {table} with id {id}', |
|
325 | ['table' => $table, 'id' => $id] |
|
326 | ); |
|
327 | ||
328 | $this->connection->update($table, $row, ['id' => $id]); |
|
329 | } |
|
330 | ||
331 | /** |
|
332 | * @param string $id |