diff -r 000000000000 -r 4eba9c11703f web/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Service/DeveloperGarden/Response/IpLocation/LocateIPResponse.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,98 @@ +ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { + if (is_array($response->ipAddressLocation)) { + foreach ($response->ipAddressLocation as $location) { + $this->ipAddressLocation[] = $location; + } + + } else { + $this->ipAddressLocation[] = $response->ipAddressLocation; + } + } elseif (is_array($response->ipAddressLocation)) { + $this->ipAddressLocation = $response->ipAddressLocation; + } + + $this->errorCode = $response->getErrorCode(); + $this->errorMessage = $response->getErrorMessage(); + $this->statusCode = $response->getStatusCode(); + $this->statusMessage = $response->getStatusMessage(); + } + + /** + * implement own parsing mechanism to fix broken wsdl implementation + */ + public function parse() + { + parent::parse(); + if (is_array($this->ipAddressLocation)) { + foreach ($this->ipAddressLocation as $address) { + $address->parse(); + } + } elseif ($this->ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { + $this->ipAddressLocation->parse(); + } + + return $this; + } + + /** + * @return array + */ + public function getIpAddressLocation() + { + return $this->ipAddressLocation; + } +}