config = $config; } /** * Builds the URL to request the release notification content data based on passed parameters. * * @param string $version * @param string $edition * @param string $locale * @return string */ public function getUrl($version, $edition, $locale) { $scheme = $this->config->isSetFlag(self::$useHttpsFlagConfigPath) ? 'https://' : 'http://'; $baseUrl = $this->config->getValue(self::$notificationContentUrlConfigPath); if (empty($baseUrl)) { return ''; } else { $url = $scheme . $baseUrl; $url .= empty($version) ? '' : '/' . $version; $url .= empty($edition) ? '' : '/' . $edition; $url .= empty($locale) ? '' : '/' . $locale; return $url . '.json'; } } }