Skip to content

Commit 9bca0b9

Browse files
authored
Add toArray method in Address
1 parent af0d84f commit 9bca0b9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Model/Address.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,19 @@ public function setLongitude($longitude)
110110
{
111111
$this->longitude = $longitude;
112112
}
113+
114+
/**
115+
* @return array
116+
*/
117+
public function toArray()
118+
{
119+
return array(
120+
'street' => $this->street,
121+
'city' => $this->city,
122+
'house_number' => $this->houseNumber,
123+
'zip_code' => $this->zipCode,
124+
'longitude' => $this->longitude,
125+
'latitude' => $this->latitude,
126+
);
127+
}
113128
}

0 commit comments

Comments
 (0)