Wikibase
MediaWiki Wikibase extension
Wikibase\DataModel\Services\Statement\StatementGuidValidator Class Reference

Public Member Functions

 __construct (EntityIdParser $entityIdParser)
 
 validate ( $guid)
 Validates a statement guid. More...
 
 validateFormat ( $guid)
 Basic validation for statement guid format. More...
 

Private Member Functions

 validateGuid ( $guid)
 Validate the second part of a statement guid, after the $. More...
 
 validateStatementGuidPrefix ( $prefixedId)
 Validate the statement guid prefix is a valid entity id. More...
 

Private Attributes

 $entityIdParser
 

Detailed Description

Since
1.1
Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Services\Statement\StatementGuidValidator::__construct ( EntityIdParser  $entityIdParser)

Member Function Documentation

◆ validate()

Wikibase\DataModel\Services\Statement\StatementGuidValidator::validate (   $guid)

Validates a statement guid.

Since
0.4
Parameters
string$guid
Returns
boolean

◆ validateFormat()

Wikibase\DataModel\Services\Statement\StatementGuidValidator::validateFormat (   $guid)

Basic validation for statement guid format.

Since
0.4
Parameters
string$guid
Returns
boolean

◆ validateGuid()

Wikibase\DataModel\Services\Statement\StatementGuidValidator::validateGuid (   $guid)
private

Validate the second part of a statement guid, after the $.

Since
0.4
Parameters
string$guid
Returns
boolean

◆ validateStatementGuidPrefix()

Wikibase\DataModel\Services\Statement\StatementGuidValidator::validateStatementGuidPrefix (   $prefixedId)
private

Validate the statement guid prefix is a valid entity id.

Since
0.4
Parameters
string$prefixedId
Returns
boolean

Member Data Documentation

◆ $entityIdParser

Wikibase\DataModel\Services\Statement\StatementGuidValidator::$entityIdParser
private

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