EricMakesStuff\ServerMonitor\Monitors\SSLCertificateMonitor::parseUrl PHP Method

parseUrl() protected method

protected parseUrl ( $url )
    protected function parseUrl($url)
    {
        if (empty($url)) {
            throw InvalidConfiguration::noUrlConfigured();
        }
        $urlParts = parse_url($url);
        if (!$urlParts) {
            throw InvalidConfiguration::urlCouldNotBeParsed();
        }
        if (empty($urlParts['scheme']) || $urlParts['scheme'] != 'https') {
            throw InvalidConfiguration::urlNotSecure();
        }
        return $urlParts;
    }