diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/Amazon/Ec2/Availabilityzones.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/Amazon/Ec2/Availabilityzones.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,76 @@ +$name) { + $params['ZoneName.' . ($k+1)] = $name; + } + } elseif($zoneName) { + $params['ZoneName.1'] = $zoneName; + } + + $response = $this->sendRequest($params); + + $xpath = $response->getXPath(); + $nodes = $xpath->query('//ec2:item'); + + $return = array(); + foreach ($nodes as $k => $node) { + $item = array(); + $item['zoneName'] = $xpath->evaluate('string(ec2:zoneName/text())', $node); + $item['zoneState'] = $xpath->evaluate('string(ec2:zoneState/text())', $node); + + $return[] = $item; + unset($item); + } + + return $return; + } +}