1 | <?php |
||
11 | final class EntitySet implements Countable, IteratorAggregate, Serializable |
||
12 | { |
||
13 | /** |
||
14 | * @var Entity[] |
||
15 | */ |
||
16 | private $entities = array(); |
||
17 | |||
18 | /** |
||
19 | * @param Entity[] $entities |
||
20 | */ |
||
21 | public function __construct(array $entities = array()) |
||
33 | |||
34 | /** |
||
35 | * @param Entity $entity The entity to search for. |
||
36 | * @return boolean 'true' if the collection contains the element, 'false' otherwise. |
||
37 | */ |
||
38 | public function contains(Entity $entity) |
||
48 | |||
49 | /** |
||
50 | * @param EntitySet $other |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function equals(EntitySet $other) |
||
67 | |||
68 | public function getIterator() |
||
72 | |||
73 | public function count() |
||
77 | |||
78 | public static function deserialize($data) |
||
88 | |||
89 | public function serialize() |
||
95 | |||
96 | public function __toString() |
||
100 | } |
||
101 |