MediaWiki master
MediaWiki\Settings\Source\JsonSchemaReferenceResolver Class Reference

Utility for resolving references ($ref) in JSON-schemas and building a collection of the referenced definitions. More...

Static Public Member Functions

static getDefinitionName (array $schema)
 Builds a definition name based on the specified "$ref" definition.
 
static normalizeRef (array $schema)
 Returns a URI relative to a JSON-schema document for a given definition name.
 
static resolveRef (array $schema, string $rootClass)
 Returns the value of a given reference "$ref".
 

Detailed Description

Utility for resolving references ($ref) in JSON-schemas and building a collection of the referenced definitions.

Since
1.42
Stability: unstable

Definition at line 15 of file JsonSchemaReferenceResolver.php.

Member Function Documentation

◆ getDefinitionName()

static MediaWiki\Settings\Source\JsonSchemaReferenceResolver::getDefinitionName ( array $schema)
static

Builds a definition name based on the specified "$ref" definition.

Parameters
array$schemaA $ref sub-schema
Returns
string A definition name using both the name of the class and the field

Definition at line 52 of file JsonSchemaReferenceResolver.php.

◆ normalizeRef()

static MediaWiki\Settings\Source\JsonSchemaReferenceResolver::normalizeRef ( array $schema)
static

Returns a URI relative to a JSON-schema document for a given definition name.

Parameters
array$schemaA $ref sub-schema
Returns
string Definition relative URI

Definition at line 23 of file JsonSchemaReferenceResolver.php.

◆ resolveRef()

static MediaWiki\Settings\Source\JsonSchemaReferenceResolver::resolveRef ( array $schema,
string $rootClass )
static

Returns the value of a given reference "$ref".

Parameters
array$schemaA $ref sub-schema
Returns
array The value of the class field referenced by the definition

Definition at line 67 of file JsonSchemaReferenceResolver.php.


The documentation for this class was generated from the following file: