PHP Class Webmozart\PathUtil\Url

The methods in this class are able to deal with URLs.
Since: 2.3
Author: Bernhard Schussek ([email protected])
Author: Claudio Zizza ([email protected])
显示文件 Open project: webmozart/path-util Class Usage Examples

Public Methods

Method Description
makeRelative ( string $url, string $baseUrl ) : string Turns a URL into a relative path.

Private Methods

Method Description
split ( string $url ) : string[] Splits a URL into its host and the path.

Method Details

makeRelative() public static method

The result is a canonical path. This class is using functionality of Path class.
See also: Path
public static makeRelative ( string $url, string $baseUrl ) : string
$url string A URL to make relative.
$baseUrl string A base URL.
return string