This class is used to validate attributes of term change serializations such as language fields before they are passed to ChangeOps.
More...
This class is used to validate attributes of term change serializations such as language fields before they are passed to ChangeOps.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::__construct |
( |
ContentLanguages |
$termsLanguages | ) |
|
◆ assertArray()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::assertArray |
( |
|
$value, |
|
|
|
$message |
|
) |
| |
|
private |
- Parameters
-
mixed | $value | |
string | $message | |
◆ assertString()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::assertString |
( |
|
$value, |
|
|
|
$message |
|
) |
| |
|
private |
- Parameters
-
mixed | $value | |
string | $message | |
◆ assertType()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::assertType |
( |
|
$type, |
|
|
|
$value, |
|
|
|
$message |
|
) |
| |
|
private |
- Parameters
-
string | $type | |
mixed | $value | |
string | $message | |
◆ throwException()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::throwException |
( |
|
$message, |
|
|
|
$errorCode |
|
) |
| |
|
private |
- Parameters
-
string | $message | |
string | $errorCode | |
- Exceptions
-
ChangeOpDeserializationException | |
◆ validateTermSerialization()
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::validateTermSerialization |
( |
|
$serialization, |
|
|
|
$languageCode |
|
) |
| |
- Parameters
-
string[] | $serialization | Term serialization array |
int | string | $languageCode | Key from the term list array, related to $serialization. If a string its value must match $serialization['language']. |
- See also
- md_docs_topics_changeop-serializations for information on term serialization format
- Exceptions
-
ChangeOpDeserializationException | |
◆ $termsLanguages
Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator::$termsLanguages |
|
private |
The documentation for this class was generated from the following file: