1 | <?php |
||
5 | class IndexDifference implements \Countable, \IteratorAggregate |
||
6 | { |
||
7 | /** |
||
8 | * @var IndexObjectDifference[] |
||
9 | */ |
||
10 | protected $differences = []; |
||
11 | |||
12 | public function addDifference(IndexObjectDifference $difference): IndexDifference |
||
18 | |||
19 | public function getDifference(string $path): ?IndexObjectDifference |
||
23 | |||
24 | public function hasDifference(string $path): bool |
||
28 | |||
29 | /** |
||
30 | * Merges the differences of the given diff into this diff. |
||
31 | * There must be an empty intersection between the path sets of both diffs. |
||
32 | * |
||
33 | * @param IndexDifference $other |
||
34 | * @return IndexDifference |
||
35 | */ |
||
36 | public function merge(IndexDifference $other): IndexDifference |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function count() |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function getIterator() |
||
60 | } |
||
61 |