| @@ 242-252 (lines=11) @@ | ||
| 239 | * @param string $id |
|
| 240 | * @param array $row |
|
| 241 | */ |
|
| 242 | protected function insert(string $id, array $row) |
|
| 243 | { |
|
| 244 | $table = $this->getTable(); |
|
| 245 | ||
| 246 | $this->logger->info( |
|
| 247 | 'model: insert row into table {table} with id {id}', |
|
| 248 | ['table' => $table, 'id' => $id] |
|
| 249 | ); |
|
| 250 | ||
| 251 | $this->connection->insert($table, $row); |
|
| 252 | } |
|
| 253 | ||
| 254 | /** |
|
| 255 | * @param string $id |
|
| @@ 258-268 (lines=11) @@ | ||
| 255 | * @param string $id |
|
| 256 | * @param array $row |
|
| 257 | */ |
|
| 258 | protected function update(string $id, array $row) |
|
| 259 | { |
|
| 260 | $table = $this->getTable(); |
|
| 261 | ||
| 262 | $this->logger->info( |
|
| 263 | 'model: update row into table {table} with id {id}', |
|
| 264 | ['table' => $table, 'id' => $id] |
|
| 265 | ); |
|
| 266 | ||
| 267 | $this->connection->update($table, $row, ['id' => $id]); |
|
| 268 | } |
|
| 269 | ||
| 270 | /** |
|
| 271 | * @param ModelCollectionInterface $modelCollection |
|