Scalr\Modules\Platforms\AbstractAwsPlatformModule::getLocations PHP Method

getLocations() public method

Gets the list of available locations
public getLocations ( Scalr_Environment $environment = null ) : Scalr_Environment
$environment Scalr_Environment
return Scalr_Environment Returns the list of available locations looks like array(location => description)
    public function getLocations(\Scalr_Environment $environment = null)
    {
        $accountType = null;
        if ($environment instanceof \Scalr_Environment) {
            $accountType = $environment->keychain(SERVER_PLATFORMS::EC2)->properties[Entity\CloudCredentialsProperty::AWS_ACCOUNT_TYPE];
        }
        return $this->getLocationsByAccountType($accountType);
    }