UriResolver
in package
implements
UriResolverInterface
Resolves JSON Schema URIs
Tags
Table of Contents
Interfaces
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
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
stringisValid()
public
isValid(string $uri) : bool
Parameters
- $uri : string
Return values
boolparse()
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