PHP Класс Essence\Utility\Url

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
host ( array $parts ) : string Builds the full host part of an URL.
path ( array $parts ) : string Builds the full path part of an URL.
resolve ( string $url, string $base ) : string Resolves relative URLs.
resolveAll ( array $urls, string $base ) : array Resolves a set of relative URLs.
resolvePath ( string $urlPath, string $basePath ) : array Resolves relative paths.
splitPath ( string $path ) : array Splits a path in parts.

Описание методов

host() публичный статический Метод

Builds the full host part of an URL.
public static host ( array $parts ) : string
$parts array URL parts.
Результат string URL.

path() публичный статический Метод

Builds the full path part of an URL.
public static path ( array $parts ) : string
$parts array URL parts.
Результат string URL.

resolve() публичный статический Метод

Resolves relative URLs.
public static resolve ( string $url, string $base ) : string
$url string URL to resolve.
$base string URL of the page from which URLs were extracted.
Результат string Resolved URL.

resolveAll() публичный статический Метод

Resolves a set of relative URLs.
См. также: resolve()
public static resolveAll ( array $urls, string $base ) : array
$urls array URLs to resolve.
$base string URL of the page from which URLs were extracted.
Результат array Resolved URLs.

resolvePath() публичный статический Метод

Resolves relative paths.
public static resolvePath ( string $urlPath, string $basePath ) : array
$urlPath string URLs to resolve.
$basePath string URL of the page from which URLs were extracted.
Результат array Resolved path.

splitPath() публичный статический Метод

Splits a path in parts.
public static splitPath ( string $path ) : array
$path string Path.
Результат array Parts.