Exemplo n.º 1
0
 /**
  * Convert properties to array.
  *
  * @return array The
  */
 public function toArray()
 {
     $array = array('firstName' => $this->firstName, 'lastName' => $this->lastName, 'email' => $this->email, 'telephone' => $this->phoneNumber, 'mobile' => $this->mobileNumber, 'companyName' => $this->companyName);
     if ($this->address !== null) {
         $array['address'] = $this->address->toArray();
     }
     return $array;
 }
Exemplo n.º 2
0
 /**
  * Creates an Address.
  *
  * @return Address
  */
 protected function makeAddress()
 {
     $address = new Address();
     $address->configure(array('streetAddress' => 'Test street 1', 'postalCode' => '12345', 'postOffice' => 'Helsinki', 'countryCode' => 'FI'));
     return $address;
 }