diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Service/Amazon/Ec2/Availabilityzones.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Service/Amazon/Ec2/Availabilityzones.php Thu Jan 20 19:30:54 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; + } +}