| @@ 53-67 (lines=15) @@ | ||
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | protected function bindValues(PDOStatement $statement) |
|
| 54 | { |
|
| 55 | $this->resetFields(); |
|
| 56 | $this->resetPreparedItems(); |
|
| 57 | ||
| 58 | $this->iterateOverItems($this->getPreparedItems(), function ($iteration) use ($statement) { |
|
| 59 | foreach ($this->getFields() as $key => $field) { |
|
| 60 | if (in_array($field, $this->getIgnoredColumn(), true)) { |
|
| 61 | return; |
|
| 62 | } |
|
| 63 | $value = $this->getPreparedItems()[$iteration][$field] ?? $this->getPreparedItems()[$iteration][$key]; |
|
| 64 | $statement->bindValue(':'.$field.'_'.$iteration, $value); |
|
| 65 | } |
|
| 66 | }); |
|
| 67 | } |
|
| 68 | ||
| 69 | public function getReplacedCount() |
|
| 70 | { |
|
| @@ 48-62 (lines=15) @@ | ||
| 45 | ); |
|
| 46 | } |
|
| 47 | ||
| 48 | protected function bindValues(PDOStatement $statement) |
|
| 49 | { |
|
| 50 | $this->resetFields(); |
|
| 51 | $this->resetPreparedItems(); |
|
| 52 | ||
| 53 | $this->iterateOverItems($this->getPreparedItems(), function ($iteration) use ($statement) { |
|
| 54 | foreach ($this->getFields() as $key => $field) { |
|
| 55 | if (in_array($field, $this->getIgnoredColumn(), true)) { |
|
| 56 | return; |
|
| 57 | } |
|
| 58 | $value = $this->getPreparedItems()[$iteration][$field] ?? $this->getPreparedItems()[$iteration][$key]; |
|
| 59 | $statement->bindValue(':'.$field.'_'.$iteration, $value); |
|
| 60 | } |
|
| 61 | }); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function addOnDuplicateUpdateStatement(array $array) |
|
| 65 | { |
|