SchemaStorage
in package
implements
SchemaStorageInterface
Table of Contents
Interfaces
Constants
- INTERNAL_PROVIDED_SCHEMA_URI = 'internal://provided-schema/'
Properties
- $schemas : mixed
- $uriResolver : mixed
- $uriRetriever : mixed
Methods
- __construct() : mixed
- addSchema() : mixed
- Adds schema with given identifier
- getSchema() : object
- Returns schema for given identifier, or null if it does not exist
- getUriResolver() : UriResolverInterface
- getUriRetriever() : UriRetrieverInterface
- resolveRef() : object
- Returns schema for given reference with all sub-references resolved
- resolveRefSchema() : object
- Returns schema referenced by '$ref' property
- expandRefs() : mixed
- Recursively resolve all references against the provided base
Constants
INTERNAL_PROVIDED_SCHEMA_URI
public
mixed
INTERNAL_PROVIDED_SCHEMA_URI
= 'internal://provided-schema/'
Properties
$schemas
protected
mixed
$schemas
= array()
$uriResolver
protected
mixed
$uriResolver
$uriRetriever
protected
mixed
$uriRetriever
Methods
__construct()
public
__construct([UriRetrieverInterface $uriRetriever = null ][, UriResolverInterface $uriResolver = null ]) : mixed
Parameters
- $uriRetriever : UriRetrieverInterface = null
- $uriResolver : UriResolverInterface = null
addSchema()
Adds schema with given identifier
public
addSchema(mixed $id[, mixed $schema = null ]) : mixed
Parameters
- $id : mixed
- $schema : mixed = null
getSchema()
Returns schema for given identifier, or null if it does not exist
public
getSchema(mixed $id) : object
Parameters
- $id : mixed
Return values
objectgetUriResolver()
public
getUriResolver() : UriResolverInterface
Return values
UriResolverInterfacegetUriRetriever()
public
getUriRetriever() : UriRetrieverInterface
Return values
UriRetrieverInterfaceresolveRef()
Returns schema for given reference with all sub-references resolved
public
resolveRef(mixed $ref) : object
Parameters
- $ref : mixed
Return values
objectresolveRefSchema()
Returns schema referenced by '$ref' property
public
resolveRefSchema(mixed $refSchema) : object
Parameters
- $refSchema : mixed
Return values
objectexpandRefs()
Recursively resolve all references against the provided base
private
expandRefs(mixed &$schema[, string $base = null ]) : mixed
Parameters
- $schema : mixed
- $base : string = null