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 | * @var RepositoryInterface |
||
38 | */ |
||
39 | private $countryRepository; |
||
40 | |||
41 | /** |
||
42 | * @param FactoryInterface $addressFactory |
||
43 | * @param CountryNameConverterInterface $countryNameConverter |
||
44 | * @param RepositoryInterface $countryRepository |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @Transform /^to "([^"]+)"$/ |
||
58 | */ |
||
59 | public function createNewAddress($countryName) |
||
65 | |||
66 | /** |
||
67 | * @Transform /^country "([^"]+)"$/ |
||
68 | */ |
||
69 | public function getCountryByName($countryName) |
||
80 | |||
81 | /** |
||
82 | * @param string $countryCode |
||
83 | * @param string $firstName |
||
84 | * @param string $lastName |
||
85 | * @param string $city |
||
86 | * @param string $street |
||
87 | * |
||
88 | * @return AddressInterface |
||
89 | */ |
||
90 | private function createAddress( |
||
109 | } |
||
110 |