\JsonSchema\UriUriResolver

Resolves JSON Schema URIs

Summary

Methods
Properties
Constants
parse()
generate()
resolve()
combineRelativePathWithBasePath()
isValid()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
normalizePath()
No private properties found
N/A

Methods

parse()

parse(string  $uri) : array

Parses a URI into five main components

Parameters

string $uri

Returns

array

generate()

generate(array  $components) : string

Builds a URI based on n array with the main components

Parameters

array $components

Returns

string

resolve()

resolve(string  $uri, null|string  $baseUri = null) : string

Resolves a URI

Parameters

string $uri

Absolute or relative

null|string $baseUri

Optional base URI

Returns

string —

Absolute URI

combineRelativePathWithBasePath()

combineRelativePathWithBasePath(string  $relativePath, string  $basePath) : string

Tries to glue a relative path onto an absolute one

Parameters

string $relativePath
string $basePath

Throws

\JsonSchema\Exception\UriResolverException

Returns

string —

Merged path

isValid()

isValid(string  $uri) : boolean

Parameters

string $uri

Returns

boolean

normalizePath()

normalizePath(string  $path) : string

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

Parameters

string $path

Returns

string