1 | <?php |
||
24 | final class AddressingContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var FactoryInterface |
||
28 | */ |
||
29 | private $addressFactory; |
||
30 | |||
31 | /** |
||
32 | * @var CountryNameConverterInterface |
||
33 | */ |
||
34 | private $countryNameConverter; |
||
35 | |||
36 | /** |
||
37 | * @param FactoryInterface $addressFactory |
||
38 | * @param CountryNameConverterInterface $countryNameConverter |
||
39 | */ |
||
40 | public function __construct(FactoryInterface $addressFactory, CountryNameConverterInterface $countryNameConverter) |
||
45 | |||
46 | /** |
||
47 | * @Transform /^to "([^"]+)"$/ |
||
48 | */ |
||
49 | public function createNewAddress($countryName) |
||
55 | |||
56 | /** |
||
57 | * @param string $countryCode |
||
58 | * @param string $firstName |
||
59 | * @param string $lastName |
||
60 | * @param string $city |
||
61 | * @param string $street |
||
62 | * |
||
63 | * @return AddressInterface |
||
64 | */ |
||
65 | private function createAddress( |
||
84 | } |
||
85 |