| 1 | <?php |
||
| 7 | final class Destination implements \IteratorAggregate, DestinationInterface |
||
| 8 | { |
||
| 9 | /** @var string */ |
||
| 10 | private $route; |
||
| 11 | /** @var Collection */ |
||
| 12 | private $items; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $route |
||
| 16 | * @param array $items |
||
| 17 | */ |
||
| 18 | 14 | public function __construct($route, array $items) |
|
| 23 | |||
| 24 | 9 | public function getIterator() |
|
| 25 | { |
||
| 26 | 9 | return $this->items->getIterator(); |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | 13 | public function getRoute() |
|
| 36 | |||
| 37 | /** {@inheritdoc} */ |
||
| 38 | 8 | public function resolve($key) |
|
| 47 | } |
||
| 48 |