1 | <?php |
||
10 | class AddressValidator |
||
11 | { |
||
12 | const OPTION_INCLUDE_FORMATTING = 'IncludeFormatting'; |
||
13 | const OPTION_INCLUDE_SUGGESTIONS = 'IncludeSuggestions'; |
||
14 | const OPTION_INCLUDE_SUBMITTED_ADDRESS = 'IncludeSubmittedAddress'; |
||
15 | const OPTION_INCLUDE_DEFAULT_GEO_LOCATION = 'IncludeDefaultGeoLocation'; |
||
16 | const OPTION_INCLUDE_SUFFIX_LIST = 'IncludeSuffixList'; |
||
17 | const OPTION_INCLUDE_NUMBER_OF_SUFFIXES = 'IncludeNumberOfSuffixes'; |
||
18 | const OPTION_INCLUDE_LIST_OF_BOXES = 'IncludeListOfBoxes'; |
||
19 | const OPTION_INCLUDE_NUMBER_OF_BOXES = 'IncludeNumberOfBoxes'; |
||
20 | |||
21 | /** @var \Spatie\BpostAddressWebservice\Gateways\Gateway */ |
||
22 | protected $gateway; |
||
23 | |||
24 | /** @var array */ |
||
25 | protected $options = []; |
||
26 | |||
27 | public function __construct(Gateway $gateway) |
||
31 | |||
32 | public static function create(): AddressValidator |
||
36 | |||
37 | public function withOptions(array $options): AddressValidator |
||
43 | |||
44 | public function validate(Address $address): ValidatedAddress |
||
52 | |||
53 | public function validateMany(array $addresses): array |
||
67 | } |
||
68 |