Arachnid\Crawler::getPathFromUrl PHP Method

getPathFromUrl() protected method

extrating the relative path from url string
protected getPathFromUrl ( type $url ) : type
$url type
return type
    protected function getPathFromUrl($url)
    {
        if (strpos($url, $this->baseUrl) === 0 && $url !== $this->baseUrl) {
            return str_replace($this->baseUrl, '', $url);
        } else {
            return $url;
        }
    }