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