Scalr\Modules\Platforms\Cloudstack\CloudstackPlatformModule::hasCloudPrices PHP Method

hasCloudPrices() public method

See also: Scalr\Modules\PlatformModuleInterface::hasCloudPrices()
public hasCloudPrices ( Scalr_Environmen\Scalr_Environment $env )
$env Scalr_Environmen\Scalr_Environment
    public function hasCloudPrices(Scalr_Environment $env)
    {
        if (!$this->container->analytics->enabled) {
            return false;
        }
        $platform = $this->platform ?: SERVER_PLATFORMS::CLOUDSTACK;
        $url = $env->keychain($platform)->properties[Entity\CloudCredentialsProperty::CLOUDSTACK_API_URL];
        if (empty($url)) {
            return false;
        }
        return $this->container->analytics->prices->hasPriceForUrl($platform, $url) ?: $url;
    }