Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AddressAdapter.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  private $address;
20 
24  public function __construct(AddressInterface $address)
25  {
26  $this->address = $address;
27  }
28 
34  public function getRegionCode()
35  {
36  return $this->address->getRegionCode();
37  }
38 
44  public function getCountryId()
45  {
46  return $this->address->getCountryId();
47  }
48 
54  public function getStreetLine1()
55  {
56  $street = $this->address->getStreet();
57  return isset($street[0]) ? $street[0]: '';
58  }
59 
65  public function getStreetLine2()
66  {
67  $street = $this->address->getStreet();
68  return isset($street[1]) ? $street[1]: '';
69  }
70 
76  public function getTelephone()
77  {
78  return $this->address->getTelephone();
79  }
80 
86  public function getPostcode()
87  {
88  return $this->address->getPostcode();
89  }
90 
96  public function getCity()
97  {
98  return $this->address->getCity();
99  }
100 
106  public function getFirstname()
107  {
108  return $this->address->getFirstname();
109  }
110 
116  public function getLastname()
117  {
118  return $this->address->getLastname();
119  }
120 
126  public function getMiddlename()
127  {
128  return $this->address->getMiddlename();
129  }
130 
136  public function getCustomerId()
137  {
138  return $this->address->getCustomerId();
139  }
140 
146  public function getEmail()
147  {
148  return $this->address->getEmail();
149  }
150 
156  public function getPrefix()
157  {
158  return $this->address->getPrefix();
159  }
160 
166  public function getSuffix()
167  {
168  return $this->address->getSuffix();
169  }
170 
176  public function getCompany()
177  {
178  return $this->address->getCompany();
179  }
180 }
$address
Definition: customer.php:38