PredefinedArray
extends AbstractRetriever
in package
URI retrieved based on a predefined array of schemas
Tags
Table of Contents
Properties
- $contentType : string
- Media content type
- $schemas : array<string|int, mixed>
- Contains schemas as URI => JSON
Methods
- __construct() : mixed
- Constructor
- getContentType() : string
- Get media content type
- retrieve() : mixed
- Retrieve a schema from the specified URI
Properties
$contentType
Media content type
protected
string
$contentType
$schemas
Contains schemas as URI => JSON
private
array<string|int, mixed>
$schemas
Methods
__construct()
Constructor
public
__construct(array<string|int, mixed> $schemas[, string $contentType = Validator::SCHEMA_MEDIA_TYPE ]) : mixed
Parameters
- $schemas : array<string|int, mixed>
- $contentType : string = Validator::SCHEMA_MEDIA_TYPE
getContentType()
Get media content type
public
getContentType() : string
Tags
Return values
stringretrieve()
Retrieve a schema from the specified URI
public
retrieve(mixed $uri) : mixed
Parameters
- $uri : mixed
-
URI that resolves to a JSON schema
Tags
Return values
mixed —string|null