| 1 | <?php |
||
| 11 | final class InjectParams implements \IteratorAggregate, \Countable, AnnotationInterface |
||
| 12 | { |
||
| 13 | /** @var array */ |
||
| 14 | public $value = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return array|\Traversable |
||
| 18 | * @internal |
||
| 19 | */ |
||
| 20 | 2 | public function getIterator() |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Get the value. |
||
| 27 | * |
||
| 28 | * @param ServiceLocatorInterface $sm |
||
| 29 | * @return mixed |
||
| 30 | * |
||
| 31 | * @throws CannotGetValue |
||
| 32 | */ |
||
| 33 | 1 | public function getValue(ServiceLocatorInterface $sm) |
|
| 34 | { |
||
| 35 | 1 | $value = []; |
|
| 36 | |||
| 37 | /** @var Inject $injection */ |
||
| 38 | 1 | foreach ($this as $injection) { |
|
| 39 | 1 | $value[] = $injection->getValue($sm); |
|
| 40 | 1 | } |
|
| 41 | |||
| 42 | 1 | return $value; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @internal |
||
| 47 | */ |
||
| 48 | 1 | public function count() |
|
| 52 | } |
||
| 53 |