-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddressInterface.php
69 lines (60 loc) · 1.81 KB
/
AddressInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace Markup\Addressing;
/**
* A standard interface for an address.
**/
interface AddressInterface
{
/**
* Gets a name for the recipient at this address. Returns null if one is not specified.
*
* @return string|null
**/
public function getRecipient();
/**
* Gets whether the address has a recipient defined.
*
* @return bool
**/
public function hasRecipient();
/**
* Gets the numbered address line, counting from one. If there is no address line for provided number, return null.
*
* @param int $lineNumber
* @return string|null
**/
public function getStreetAddressLine($lineNumber);
/**
* Gets the address lines that are part of the street address - i.e. everything up until the postal town.
*
* @return array
**/
public function getStreetAddressLines();
/**
* Gets the locality for this address. This field is often referred to as a "town" or a "city".
*
* @return string
**/
public function getLocality();
/**
* Gets the region for this address. This field is often referred to as a "county", "state" or "province".
* If no region is indicated as part of the address information, returns an empty string.
*
* @return string
**/
public function getRegion();
/**
* Gets the postal code for this address.
* If no postal code is indicated as part of the address information, returns an empty string.
*
* @return string
**/
public function getPostalCode();
/**
* Gets the ISO-3166-2 (alpha-2) representation of the country indicated for this address.
* i.e. 'GB' for United Kingdom (*not* 'UK'), 'US' for United States.
*
* @return string
**/
public function getCountry();
}