| @@ 441-453 (lines=13) @@ | ||
| 438 | */ |
|
| 439 | public function hasUpdates($field = null, $atomicsOnly = false) |
|
| 440 | { |
|
| 441 | if (empty($field)) { |
|
| 442 | if (!empty($this->updates) || !empty($this->atomics)) { |
|
| 443 | return true; |
|
| 444 | } |
|
| 445 | ||
| 446 | foreach ($this->getFields(false) as $value) { |
|
| 447 | if ($value instanceof DocumentAccessorInterface && $value->hasUpdates()) { |
|
| 448 | return true; |
|
| 449 | } |
|
| 450 | } |
|
| 451 | ||
| 452 | return false; |
|
| 453 | } |
|
| 454 | ||
| 455 | foreach ($this->atomics as $operations) { |
|
| 456 | if (array_key_exists($field, $operations)) { |
|
| @@ 501-513 (lines=13) @@ | ||
| 498 | */ |
|
| 499 | public function hasUpdates($field = null) |
|
| 500 | { |
|
| 501 | if (empty($field)) { |
|
| 502 | if (!empty($this->updates)) { |
|
| 503 | return true; |
|
| 504 | } |
|
| 505 | ||
| 506 | foreach ($this->getFields(false) as $field => $value) { |
|
| 507 | if ($value instanceof RecordAccessorInterface && $value->hasUpdates()) { |
|
| 508 | return true; |
|
| 509 | } |
|
| 510 | } |
|
| 511 | ||
| 512 | return false; |
|
| 513 | } |
|
| 514 | ||
| 515 | if (array_key_exists($field, $this->updates)) { |
|
| 516 | return true; |
|