Scalr\Modules\Platforms\Ec2\Ec2PlatformModule::hasCloudPrices PHP Method

hasCloudPrices() public method

See also: Scalr\Modules\PlatformModuleInterface::hasCloudPrices()
public hasCloudPrices ( Scalr_Environment $env )
$env Scalr_Environment
    public function hasCloudPrices(\Scalr_Environment $env)
    {
        if (!$this->container->analytics->enabled) {
            return false;
        }
        if (in_array($env->keychain(SERVER_PLATFORMS::EC2)->properties[Entity\CloudCredentialsProperty::AWS_ACCOUNT_TYPE], [Entity\CloudCredentialsProperty::AWS_ACCOUNT_TYPE_GOV_CLOUD, Entity\CloudCredentialsProperty::AWS_ACCOUNT_TYPE_CN_CLOUD])) {
            $locations = $this->getLocations($env);
            $cloudLocation = key($locations);
        }
        return $this->container->analytics->prices->hasPriceForUrl(\SERVER_PLATFORMS::EC2, '', isset($cloudLocation) ? $cloudLocation : null);
    }