Scalr\Stats\CostAnalytics\Prices::getCloudLocations PHP Method

getCloudLocations() public method

These locations are retrieved from prices table, not from the environment settings.
public getCloudLocations ( string $platform ) : array
$platform string The cloud platform
return array Returns array looks like array(url1 => array(cloudLocation1, cloudLocation2, ...), url2 => ...);
    public function getCloudLocations($platform)
    {
        $ret = [];
        $res = $this->cadb->Execute("\n            SELECT DISTINCT `url`, `cloud_location` FROM `price_history`\n            WHERE `platform` = ?\n        ", [$platform]);
        while ($rec = $res->FetchRow()) {
            $url = is_null($rec['url']) ? '' : $rec['url'];
            $ret[$url][] = $rec['cloud_location'];
        }
        return $ret;
    }