Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\RestApi\Application\Validation\StatementsValidator Class Reference
+ Collaboration diagram for Wikibase\Repo\RestApi\Application\Validation\StatementsValidator:

Public Member Functions

 __construct (StatementsDeserializer $statementsDeserializer)
 
 validate (array $statements, string $basePath='')
 
 getValidatedStatements ()
 

Public Attributes

const CODE_STATEMENTS_NOT_ASSOCIATIVE = 'statements-validator-code-invalid-statements-type'
 
const CODE_STATEMENT_GROUP_NOT_SEQUENTIAL = 'statements-validator-code-invalid-statement-group-type'
 
const CODE_STATEMENT_NOT_ARRAY = 'statements-validator-code-invalid-statement-type'
 
const CODE_INVALID_STATEMENT_DATA = 'statements-validator-code-statement-data-invalid-field'
 
const CODE_MISSING_STATEMENT_DATA = 'statements-validator-code-statement-data-missing-field'
 
const CODE_PROPERTY_ID_MISMATCH = 'statements-validator-code-property-id-mismatch'
 
const CONTEXT_STATEMENTS = 'statements-validator-context-statements'
 
const CONTEXT_PATH = 'statements-validator-context-path'
 
const CONTEXT_FIELD = 'statements-validator-context-field'
 
const CONTEXT_VALUE = 'statements-validator-context-value'
 
const CONTEXT_PROPERTY_ID_KEY = 'statements-validator-context-property-id-key'
 
const CONTEXT_PROPERTY_ID_VALUE = 'statements-validator-context-property-id-value'
 

Private Attributes

StatementsDeserializer $statementsDeserializer
 
StatementList $deserializedStatements = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::__construct ( StatementsDeserializer $statementsDeserializer)

Member Function Documentation

◆ getValidatedStatements()

Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::getValidatedStatements ( )

◆ validate()

Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::validate ( array $statements,
string $basePath = '' )

Member Data Documentation

◆ $deserializedStatements

StatementList Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::$deserializedStatements = null
private

◆ $statementsDeserializer

StatementsDeserializer Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::$statementsDeserializer
private

◆ CODE_INVALID_STATEMENT_DATA

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_INVALID_STATEMENT_DATA = 'statements-validator-code-statement-data-invalid-field'

◆ CODE_MISSING_STATEMENT_DATA

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_MISSING_STATEMENT_DATA = 'statements-validator-code-statement-data-missing-field'

◆ CODE_PROPERTY_ID_MISMATCH

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_PROPERTY_ID_MISMATCH = 'statements-validator-code-property-id-mismatch'

◆ CODE_STATEMENT_GROUP_NOT_SEQUENTIAL

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_STATEMENT_GROUP_NOT_SEQUENTIAL = 'statements-validator-code-invalid-statement-group-type'

◆ CODE_STATEMENT_NOT_ARRAY

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_STATEMENT_NOT_ARRAY = 'statements-validator-code-invalid-statement-type'

◆ CODE_STATEMENTS_NOT_ASSOCIATIVE

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CODE_STATEMENTS_NOT_ASSOCIATIVE = 'statements-validator-code-invalid-statements-type'

◆ CONTEXT_FIELD

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_FIELD = 'statements-validator-context-field'

◆ CONTEXT_PATH

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_PATH = 'statements-validator-context-path'

◆ CONTEXT_PROPERTY_ID_KEY

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_PROPERTY_ID_KEY = 'statements-validator-context-property-id-key'

◆ CONTEXT_PROPERTY_ID_VALUE

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_PROPERTY_ID_VALUE = 'statements-validator-context-property-id-value'

◆ CONTEXT_STATEMENTS

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_STATEMENTS = 'statements-validator-context-statements'

◆ CONTEXT_VALUE

const Wikibase\Repo\RestApi\Application\Validation\StatementsValidator::CONTEXT_VALUE = 'statements-validator-context-value'

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