protected function ensureSslEndpoint($url)
    {
        // If the endpoint isn't on SSL
        if (substr($url, 0, 5) != 'https') {
            // Force an SSL endpoint
            $endpoint = parse_url($url);
            $url = 'https://' . $endpoint['host'] . $endpoint['path'];
        }

        // SSL already enabled
        return $url;
    }
protected function ensureSslEndpoint($url)
    {
        // If the endpoint isn't on SSL
        if (substr($url, 0, 5) != 'https') {
            // Force an SSL endpoint
            $endpoint = parse_url($url);
            $url = 'https://' . $endpoint['host'] . $endpoint['path'];
        }

        // SSL already enabled
        return $url;
    }
protected function ensureSslEndpoint ( $ url ) { // If the endpoint isn't on SSL if ( substr ( $ url , 0 , 5 ) != 'https' ) { // Force an SSL endpoint $ endpoint = parse_url ( $ url ) ; $ url = 'https://' . $ endpoint [ 'host' ] . $ endpoint [ 'path' ] ; } // SSL already enabled return $ url ; }
Ensure the endpoint is SSL

@param $url
@return string
Ensure the endpoint is SSL