Serializer and Deserializer for Statement Ranks.
More...
|
| deserialize ( $serializedRank) |
| Deserializes the rank and returns an element from the Statement::RANK_ enum.
|
|
| serialize ( $rank) |
| Serializes the rank.
|
|
|
static | getRanks () |
| Returns the available ranks in serialized form.
|
|
Serializer and Deserializer for Statement Ranks.
- Todo
- this could be moved to DataModelSerialization (in some form)
- Copyright
- GPL-2.0-or-later
◆ deserialize()
Wikibase\Repo\StatementRankSerializer::deserialize |
( |
| $serializedRank | ) |
|
Deserializes the rank and returns an element from the Statement::RANK_ enum.
- Parameters
-
- Exceptions
-
- Returns
- int PhanParamSignatureMismatch
◆ getRanks()
static Wikibase\Repo\StatementRankSerializer::getRanks |
( |
| ) |
|
|
static |
Returns the available ranks in serialized form.
- Returns
- string[]
◆ serialize()
Wikibase\Repo\StatementRankSerializer::serialize |
( |
| $rank | ) |
|
Serializes the rank.
- Parameters
-
- Exceptions
-
- Returns
- string
◆ $rankMap
Wikibase\Repo\StatementRankSerializer::$rankMap |
|
staticprivate |
Initial value:= [
Statement::RANK_DEPRECATED => 'deprecated',
Statement::RANK_NORMAL => 'normal',
Statement::RANK_PREFERRED => 'preferred',
]
The documentation for this class was generated from the following file: