| 1 | <?php |
||
| 20 | final class ReflectionPropertySet implements IteratorAggregate |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $elements = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Ensure the element exists in the collection |
||
| 29 | * |
||
| 30 | * Returns true if the collection can contain duplicates, |
||
| 31 | * and false if it cannot. |
||
| 32 | * |
||
| 33 | * @param ReflectionProperty $element |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | 3 | public function add(ReflectionProperty $element): bool |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Returns an array of all elements in the collection |
||
| 50 | * |
||
| 51 | * @return array |
||
| 52 | */ |
||
| 53 | 4 | public function toArray(): array |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Retrieve an external iterator |
||
| 60 | * |
||
| 61 | * @return ArrayIterator |
||
| 62 | */ |
||
| 63 | 1 | public function getIterator(): ArrayIterator |
|
| 67 | } |
||
| 68 |