Пример #1
0
 public static function getValues(PhysicalAddressResource $physical_address)
 {
     $values['room_number'] = $physical_address->getRoomNumber();
     $values['building'] = $physical_address->getBuilding();
     $values['street'] = $physical_address->getStreet();
     $values['post_box'] = $physical_address->getPostBox();
     $values['city'] = $physical_address->getCity();
     $values['state'] = $physical_address->getState();
     $values['zip'] = $physical_address->getZip();
     return $values;
 }
Пример #2
0
 public static function getGoogleSearchString(\contact\Resource\ContactInfo\PhysicalAddress $physical_address)
 {
     $building = $physical_address->getBuilding();
     $street = $physical_address->getStreet();
     $city = $physical_address->getCity();
     $state = $physical_address->getState();
     if (empty($building) || empty($street) || empty($city) || empty($state)) {
         throw new \Exception('Building, street, city and state are required information.');
     } else {
         $address = "{$building},+{$street},+{$city},+{$state}";
         return $address;
     }
 }