| 1 | <?php |
||
| 24 | abstract class AbstractSet implements AttributeAwareInterface, Countable, IteratorAggregate |
||
| 25 | { |
||
| 26 | use AttributeAwareTrait; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Contained elements. |
||
| 30 | * |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | protected $data = []; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Gets the contained elements. |
||
| 37 | * |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public function get(): array |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function getIterator(): Traversable |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Remove all contained elements. |
||
| 55 | */ |
||
| 56 | public function clear() |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Checks if no elements are contained. |
||
| 63 | * |
||
| 64 | * @return bool |
||
| 65 | */ |
||
| 66 | public function isEmpty(): bool |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | public function count(): int |
||
| 78 | } |
||
| 79 |