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