PHP Class Essence\Utility\Url

Afficher le fichier Open project: benjamminf/craft-embedded-assets Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

host() public static méthode

Builds the full host part of an URL.
public static host ( array $parts ) : string
$parts array URL parts.
Résultat string URL.

path() public static méthode

Builds the full path part of an URL.
public static path ( array $parts ) : string
$parts array URL parts.
Résultat string URL.

resolve() public static méthode

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.
Résultat string Resolved URL.

resolveAll() public static méthode

Resolves a set of relative URLs.
See also: 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.
Résultat array Resolved URLs.

resolvePath() public static méthode

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.
Résultat array Resolved path.

splitPath() public static méthode

Splits a path in parts.
public static splitPath ( string $path ) : array
$path string Path.
Résultat array Parts.