\JsonSchemaSchemaStorage

Summary

Methods
Properties
Constants
__construct()
getUriRetriever()
getUriResolver()
addSchema()
getSchema()
resolveRef()
resolveRefSchema()
No public properties found
INTERNAL_PROVIDED_SCHEMA_URI
No protected methods found
$uriRetriever
$uriResolver
$schemas
N/A
expandRefs()
No private properties found
N/A

Constants

INTERNAL_PROVIDED_SCHEMA_URI

INTERNAL_PROVIDED_SCHEMA_URI = 'internal://provided-schema/'

Properties

$uriRetriever

$uriRetriever : 

Type

$uriResolver

$uriResolver : 

Type

$schemas

$schemas : 

Type

Methods

addSchema()

addSchema(string  $id, object  $schema = null) 

Adds schema with given identifier

Parameters

string $id
object $schema

getSchema()

getSchema(string  $id) : object

Returns schema for given identifier, or null if it does not exist

Parameters

string $id

Returns

object

resolveRef()

resolveRef(string  $ref) : object

Returns schema for given reference with all sub-references resolved

Parameters

string $ref

Returns

object

resolveRefSchema()

resolveRefSchema(mixed  $refSchema) : object

Returns schema referenced by '$ref' property

Parameters

mixed $refSchema

Returns

object

expandRefs()

expandRefs(mixed  $schema, string  $base = null) 

Recursively resolve all references against the provided base

Parameters

mixed $schema
string $base