src/Request/URL.php
public static function getPathFromURL($url)
	{
		$path = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		$path = str_replace(self::getDomainFromURL($url), '', $path);
		
		if($path == '') return '/';
		
		return $path;
	}
public static function getPathFromURL($url)
	{
		$path = str_replace(self::getProtocolFromURL($url) . '://', '', $url);
		$path = str_replace(self::getDomainFromURL($url), '', $path);
		
		if($path == '') return '/';
		
		return $path;
	}
public static function getPathFromURL ( $ url ) { $ path = str_replace ( self :: getProtocolFromURL ( $ url ) . '://' , '' , $ url ) ; $ path = str_replace ( self :: getDomainFromURL ( $ url ) , '' , $ path ) ; if ( $ path == '' ) return '/' ; return $ path ; }
Extracts the path from a URL

@param $url string The URL

@return string The path
Extracts the path from a URL