HumHub Documentation (unofficial)

UriResolver
in package
implements UriResolverInterface

Resolves JSON Schema URIs

Tags
author

Sander Coolen sander@jibber.nl

Table of Contents

Interfaces

UriResolverInterface

Methods

combineRelativePathWithBasePath()  : string
Tries to glue a relative path onto an absolute one
generate()  : string
Builds a URI based on n array with the main components
isValid()  : bool
parse()  : array<string|int, mixed>
Parses a URI into five main components
resolve()  : string
Resolves a URI
normalizePath()  : string
Normalizes a URI path component by removing dot-slash and double slashes

Methods

combineRelativePathWithBasePath()

Tries to glue a relative path onto an absolute one

public static combineRelativePathWithBasePath(string $relativePath, string $basePath) : string
Parameters
$relativePath : string
$basePath : string
Tags
throws
UriResolverException
Return values
string

Merged path

generate()

Builds a URI based on n array with the main components

public generate(array<string|int, mixed> $components) : string
Parameters
$components : array<string|int, mixed>
Return values
string

isValid()

public isValid(string $uri) : bool
Parameters
$uri : string
Return values
bool

parse()

Parses a URI into five main components

public parse(string $uri) : array<string|int, mixed>
Parameters
$uri : string
Return values
array<string|int, mixed>

resolve()

Resolves a URI

public resolve(mixed $uri[, mixed $baseUri = null ]) : string
Parameters
$uri : mixed

Absolute or relative

$baseUri : mixed = null

Optional base URI

Return values
string

Absolute URI

normalizePath()

Normalizes a URI path component by removing dot-slash and double slashes

private static normalizePath(string $path) : string
Parameters
$path : string
Return values
string

        
On this page

Search results