Purl\Parser::doParseUrl PHP Метод

doParseUrl() защищенный Метод

protected doParseUrl ( string $url ) : array
$url string
Результат array $parsedUrl
    protected function doParseUrl($url)
    {
        // If there's a single leading forward slash, use parse_url()
        // Expected matches:
        //
        // "/one/two"   YES
        // "/"          YES PLEASE
        // "//"         NO
        // "//one/two"  NO
        // ""           HELL NO
        if (preg_match('#^[\\/]([^\\/]|$)#', $url) === 1) {
            return parse_url($url);
        } else {
            // Otherwise use the PSL parser
            return $this->pslParser->parseUrl($url)->toArray();
        }
    }