| 1 | <?php | ||
| 5 | class AddressComponentCollection implements \IteratorAggregate | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * @var AddressComponent[] | ||
| 9 | */ | ||
| 10 | private $components = []; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * @param AddressComponent $component | ||
| 14 | * | ||
| 15 | * @return $this | ||
| 16 | */ | ||
| 17 | public function addComponent(AddressComponent $component) | ||
| 23 | |||
| 24 | /** | ||
| 25 | * @param string $type | ||
| 26 | * | ||
| 27 | * @return AddressComponent|null | ||
| 28 | */ | ||
| 29 | public function findOneComponentByType($type) | ||
| 37 | |||
| 38 | /** | ||
| 39 | * @param string $type | ||
| 40 | * | ||
| 41 | * @return array | ||
| 42 | */ | ||
| 43 | public function findComponentsByType($type) | ||
| 54 | |||
| 55 | /** | ||
| 56 |      * {@inheritdoc} | ||
| 57 | */ | ||
| 58 | public function getIterator() | ||
| 62 | } | ||
| 63 |