Scalr\Modules\Platforms\Openstack\OpenstackPlatformModule::hasCloudPrices PHP Метод

hasCloudPrices() публичный Метод

См. также: 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;
        }
        $platform = $this->platform ?: \SERVER_PLATFORMS::OPENSTACK;
        $url = $env->keychain($this->platform)->properties[Entity\CloudCredentialsProperty::OPENSTACK_KEYSTONE_URL];
        if (empty($url)) {
            return false;
        }
        return $this->container->analytics->prices->hasPriceForUrl($platform, $url) ?: $url;
    }