|
@@ 394-405 (lines=12) @@
|
| 391 |
|
|
| 392 |
|
$diff = new Diff\UpdateCollection($this); |
| 393 |
|
break; |
| 394 |
|
case self::INSERT_COLLECTION_MODE: |
| 395 |
|
$sourceCollection = $this->getSourceElement(); |
| 396 |
|
$prefixPath = $this->getPathToElement(); |
| 397 |
|
if ($sourceCollection instanceof Collection) { |
| 398 |
|
$this->collectionElementsDiff = $this->getCollectionDiffService() |
| 399 |
|
->buildDiffInsertedCollection($sourceCollection, $prefixPath); |
| 400 |
|
} else { |
| 401 |
|
throw new Exception\DomainException('Invalid collections'); |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
$diff = new Diff\InsertCollection($this); |
| 405 |
|
break; |
| 406 |
|
case self::DELETE_COLLECTION_MODE: |
| 407 |
|
$sourceCollection = $this->getSourceElement(); |
| 408 |
|
$prefixPath = $this->getPathToElement(); |
|
@@ 406-417 (lines=12) @@
|
| 403 |
|
|
| 404 |
|
$diff = new Diff\InsertCollection($this); |
| 405 |
|
break; |
| 406 |
|
case self::DELETE_COLLECTION_MODE: |
| 407 |
|
$sourceCollection = $this->getSourceElement(); |
| 408 |
|
$prefixPath = $this->getPathToElement(); |
| 409 |
|
if ($sourceCollection instanceof Collection) { |
| 410 |
|
$this->collectionElementsDiff = $this->getCollectionDiffService() |
| 411 |
|
->buildDiffDeletedCollection($sourceCollection, $prefixPath); |
| 412 |
|
} else { |
| 413 |
|
throw new Exception\DomainException('Invalid collections'); |
| 414 |
|
} |
| 415 |
|
|
| 416 |
|
$diff = new Diff\DeleteCollection($this); |
| 417 |
|
break; |
| 418 |
|
default: |
| 419 |
|
throw new Exception\DomainException(sprintf('Unknown mode %s', $this->mode)); |
| 420 |
|
|