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