diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/DeveloperGarden/IpLocation.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/DeveloperGarden/IpLocation.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,120 @@ + 'Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponseType', + 'IPAddressLocationType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType', + 'RegionType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_RegionType', + 'GeoCoordinatesType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_GeoCoordinatesType', + 'CityType' => 'Zend_Service_DeveloperGarden_Response_IpLocation_CityType', + ); + + /** + * locate the given Ip address or array of addresses + * + * @param Zend_Service_DeveloperGarden_IpLocation_IpAddress|string $ip + * @return Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse + */ + public function locateIP($ip) + { + $request = new Zend_Service_DeveloperGarden_Request_IpLocation_LocateIPRequest( + $this->getEnvironment(), + $ip + ); + + $result = $this->getSoapClient()->locateIP($request); + + $response = new Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse($result); + return $response->parse(); + } +}