|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00026 require_once 'Zend/Service/DeveloperGarden/Response/BaseType.php'; 00027 00036 class Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponse 00037 extends Zend_Service_DeveloperGarden_Response_BaseType 00038 { 00045 public $ipAddressLocation = array(); 00046 00052 public function __construct( 00053 Zend_Service_DeveloperGarden_Response_IpLocation_LocateIPResponseType $response 00054 ) { 00055 if ($response->ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { 00056 if (is_array($response->ipAddressLocation)) { 00057 foreach ($response->ipAddressLocation as $location) { 00058 $this->ipAddressLocation[] = $location; 00059 } 00060 00061 } else { 00062 $this->ipAddressLocation[] = $response->ipAddressLocation; 00063 } 00064 } elseif (is_array($response->ipAddressLocation)) { 00065 $this->ipAddressLocation = $response->ipAddressLocation; 00066 } 00067 00068 $this->errorCode = $response->getErrorCode(); 00069 $this->errorMessage = $response->getErrorMessage(); 00070 $this->statusCode = $response->getStatusCode(); 00071 $this->statusMessage = $response->getStatusMessage(); 00072 } 00073 00077 public function parse() 00078 { 00079 parent::parse(); 00080 if (is_array($this->ipAddressLocation)) { 00081 foreach ($this->ipAddressLocation as $address) { 00082 $address->parse(); 00083 } 00084 } elseif ($this->ipAddressLocation instanceof Zend_Service_DeveloperGarden_Response_IpLocation_IPAddressLocationType) { 00085 $this->ipAddressLocation->parse(); 00086 } 00087 00088 return $this; 00089 } 00090 00094 public function getIpAddressLocation() 00095 { 00096 return $this->ipAddressLocation; 00097 } 00098 }