1 | <?php |
||
9 | final class EntitySet implements Countable, IteratorAggregate |
||
10 | { |
||
11 | /** |
||
12 | * @var Entity[] |
||
13 | */ |
||
14 | private $entities = array(); |
||
15 | |||
16 | /** |
||
17 | * @param Entity[] $entities |
||
18 | */ |
||
19 | public function __construct(array $entities = array()) |
||
25 | |||
26 | /** |
||
27 | * @param Entity $entity The entity to search for. |
||
28 | * @return boolean 'true' if the collection contains the element, 'false' otherwise. |
||
29 | */ |
||
30 | public function contains(Entity $entity) |
||
40 | |||
41 | /** |
||
42 | * @param EntitySet $other |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function equals(EntitySet $other) |
||
59 | |||
60 | public function getIterator() |
||
64 | |||
65 | public function count() |
||
69 | |||
70 | /** |
||
71 | * @param Entity $entity |
||
72 | */ |
||
73 | private function initializeWith(Entity $entity) |
||
81 | } |
||
82 |