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, |
|
|
array | $params = [] ) |
|
private |
- Parameters
-
string | $message | |
string | $errorCode | |
array | $params | |
- Returns
- never
- 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
- Change op 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: