1 | <?php |
||
22 | abstract class AbstractSet implements Countable, IteratorAggregate |
||
23 | { |
||
24 | /** |
||
25 | * Contained elements. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $data = []; |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function getIterator(): Traversable |
||
38 | |||
39 | /** |
||
40 | * Remove all contained elements. |
||
41 | */ |
||
42 | public function clear() |
||
46 | |||
47 | /** |
||
48 | * Checks if no elements are contained. |
||
49 | * |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function isEmpty(): bool |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function count(): int |
||
64 | } |
||
65 |