src/Parser/Descriptor.php
private function getUriHostAndPath($url)
    {
        try {
            $uri = HttpUri::createFromString($url);
        } catch (InvalidArgumentException $e) {
            return ['', ''];
        }

        $host = $uri->getHost();
        $port = $uri->getPort();
        if (!$port && $uri->getScheme() == 'https') {
            $port = 443;
        }
        if ($port) {
            $host .= ':'.strval($port);
        }
        $path = $uri->getPath();
        if (!$path) {
            $path = '/';
        }

        return [$host, $path];
    }
private function getUriHostAndPath($url)
    {
        try {
            $uri = HttpUri::createFromString($url);
        } catch (InvalidArgumentException $e) {
            return ['', ''];
        }

        $host = $uri->getHost();
        $port = $uri->getPort();
        if (!$port && $uri->getScheme() == 'https') {
            $port = 443;
        }
        if ($port) {
            $host .= ':'.strval($port);
        }
        $path = $uri->getPath();
        if (!$path) {
            $path = '/';
        }

        return [$host, $path];
    }
private function getUriHostAndPath ( $ url ) { try { $ uri = HttpUri :: createFromString ( $ url ) ; } catch ( InvalidArgumentException $ e ) { return [ '' , '' ] ; } $ host = $ uri -> getHost ( ) ; $ port = $ uri -> getPort ( ) ; if ( ! $ port && $ uri -> getScheme ( ) == 'https' ) { $ port = 443 ; } if ( $ port ) { $ host .= ':' . strval ( $ port ) ; } $ path = $ uri -> getPath ( ) ; if ( ! $ path ) { $ path = '/' ; } return [ $ host , $ path ] ; }
Gets the uri host and path.

@param string $url The url

@return array The uri host and path
Gets the uri host and path .