public static function convertDataCenterLocationToArray(IDataCenterLocation $location) { $res = array(); $res['city'] = $location->getCity(); $res['state'] = $location->getState(); $res['country'] = $location->getCountry(); $res['region'] = strtolower(preg_replace('/[^A-Za-z0-9-]+/', '-', $location->getDataCenterRegion()->getName())); $res['availability_zones'] = array(); foreach ($location->getAvailabilityZones() as $az) { array_push($res['availability_zones'], CloudAssembler::convertAZtoArray($az)); } return $res; }