1 | <?php |
||
15 | class Collection implements \IteratorAggregate, \Countable |
||
16 | { |
||
17 | /** @var array|Annotation[] */ |
||
18 | protected $annotations; |
||
19 | |||
20 | /** |
||
21 | * @param Annotation[] ...$annotations |
||
22 | */ |
||
23 | 22 | public function __construct(Annotation ...$annotations) |
|
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | 1 | public function getIterator() : \ArrayIterator |
|
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 6 | public function count() : int |
|
43 | |||
44 | /** |
||
45 | * @return Annotation[] |
||
46 | */ |
||
47 | 1 | public function getAll() : array |
|
51 | |||
52 | /** |
||
53 | * @param string $name |
||
54 | * @return bool |
||
55 | */ |
||
56 | 7 | public function has(string $name) : bool |
|
66 | |||
67 | /** |
||
68 | * @param string $name |
||
69 | * @return Annotation |
||
70 | * @throws CollectionException |
||
71 | */ |
||
72 | 6 | public function findOne(string $name) : Annotation |
|
82 | |||
83 | /** |
||
84 | * @param string $name |
||
85 | * @return Collection|Annotation[] |
||
86 | */ |
||
87 | 1 | public function find(string $name) : Collection |
|
99 | } |
||
100 |