Class representing a Wikibase statement.
More...
◆ __construct()
Wikibase\DataModel\Statement\Statement::__construct |
( |
Snak | $mainSnak, |
|
|
SnakList | $qualifiers = null, |
|
|
ReferenceList | $references = null, |
|
|
string | $guid = null ) |
- Since
- 2.0
- Parameters
-
Snak | $mainSnak | |
SnakList | null | $qualifiers | |
ReferenceList | null | $references | |
string | null | $guid | |
◆ __clone()
Wikibase\DataModel\Statement\Statement::__clone |
( |
| ) |
|
◆ addNewReference()
Wikibase\DataModel\Statement\Statement::addNewReference |
( |
Snak ... | $snaks | ) |
|
◆ equals()
Wikibase\DataModel\Statement\Statement::equals |
( |
| $target | ) |
|
- Since
- 0.7.4
- Parameters
-
- Returns
- bool
◆ getAllSnaks()
Wikibase\DataModel\Statement\Statement::getAllSnaks |
( |
| ) |
|
Returns a list of all Snaks on this statement.
This includes the main snak and all snaks from qualifiers and references.
This is a convenience method for use in code that needs to operate on all snaks, e.g. to find all referenced Entities.
- Returns
- Snak[]
◆ getGuid()
Wikibase\DataModel\Statement\Statement::getGuid |
( |
| ) |
|
- Since
- 0.2
- Returns
- string|null
◆ getHash()
Wikibase\DataModel\Statement\Statement::getHash |
( |
| ) |
|
◆ getMainSnak()
Wikibase\DataModel\Statement\Statement::getMainSnak |
( |
| ) |
|
Returns the main value snak of this statement.
- Since
- 0.1
- Returns
- Snak
◆ getPropertyId()
Wikibase\DataModel\Statement\Statement::getPropertyId |
( |
| ) |
|
Returns the id of the property of the main snak.
Short for ->getMainSnak()->getPropertyId()
- See also
- PropertyIdProvider::getPropertyId
- Since
- 0.2
- Returns
- PropertyId
Implements Wikibase\DataModel\PropertyIdProvider.
◆ getQualifiers()
Wikibase\DataModel\Statement\Statement::getQualifiers |
( |
| ) |
|
Returns the property value snaks making up the qualifiers for this statement.
- Since
- 0.1
- Returns
- SnakList
◆ getRank()
Wikibase\DataModel\Statement\Statement::getRank |
( |
| ) |
|
◆ getReferences()
Wikibase\DataModel\Statement\Statement::getReferences |
( |
| ) |
|
Returns the references attached to this statement.
- Since
- 0.1
- Returns
- ReferenceList
◆ setGuid()
Wikibase\DataModel\Statement\Statement::setGuid |
( |
?string | $guid | ) |
|
Sets the GUID of this statement.
- Since
- 0.2
- Parameters
-
◆ setMainSnak()
Wikibase\DataModel\Statement\Statement::setMainSnak |
( |
Snak | $mainSnak | ) |
|
Sets the main value snak of this statement.
- Since
- 0.1
- Parameters
-
◆ setQualifiers()
Wikibase\DataModel\Statement\Statement::setQualifiers |
( |
SnakList | $propertySnaks | ) |
|
Sets the property value snaks making up the qualifiers for this statement.
- Since
- 0.1
- Parameters
-
◆ setRank()
Wikibase\DataModel\Statement\Statement::setRank |
( |
int | $rank | ) |
|
Sets the rank of the statement.
The rank is an element of the Statement::RANK_ enum.
- Since
- 0.1
- Parameters
-
- Exceptions
-
◆ setReferences()
Wikibase\DataModel\Statement\Statement::setReferences |
( |
ReferenceList | $references | ) |
|
Sets the references attached to this statement.
- Since
- 0.1
- Parameters
-
◆ $guid
Wikibase\DataModel\Statement\Statement::$guid = null |
|
private |
◆ $mainSnak
Wikibase\DataModel\Statement\Statement::$mainSnak |
|
private |
◆ $qualifiers
Wikibase\DataModel\Statement\Statement::$qualifiers |
|
private |
◆ $rank
Wikibase\DataModel\Statement\Statement::$rank = self::RANK_NORMAL |
|
private |
◆ $references
Wikibase\DataModel\Statement\Statement::$references |
|
private |
◆ RANK_DEPRECATED
const Wikibase\DataModel\Statement\Statement::RANK_DEPRECATED = 0 |
◆ RANK_NORMAL
const Wikibase\DataModel\Statement\Statement::RANK_NORMAL = 1 |
◆ RANK_PREFERRED
const Wikibase\DataModel\Statement\Statement::RANK_PREFERRED = 2 |
Rank enum.
Higher values are more preferred.
- Since
- 2.0
The documentation for this class was generated from the following file: