diff --git a/src/Statement/Statement.php b/src/Statement/Statement.php index 03c7f47c..58dcc366 100644 --- a/src/Statement/Statement.php +++ b/src/Statement/Statement.php @@ -31,6 +31,23 @@ class Statement extends Claim { const RANK_NORMAL = 1; const RANK_DEPRECATED = 0; + /** + * @var string|null + */ + protected $guid = null; + + /** + * @var Snak + */ + protected $mainSnak; + + /** + * The property value snaks making up the qualifiers for this statement. + * + * @var Snaks + */ + protected $qualifiers; + /** * @var ReferenceList */ @@ -58,6 +75,78 @@ public function __construct( $this->references = $references ?: new ReferenceList(); } + /** + * Returns the GUID of this statement. + * + * @since 0.2 + * + * @return string|null + */ + public function getGuid() { + return $this->guid; + } + + /** + * Sets the GUID of this statement. + * + * @since 0.2 + * + * @param string|null $guid + * + * @throws InvalidArgumentException + */ + public function setGuid( $guid ) { + if ( !is_string( $guid ) && $guid !== null ) { + throw new InvalidArgumentException( '$guid must be a string or null' ); + } + + $this->guid = $guid; + } + + /** + * Returns the main value snak of this statement. + * + * @since 0.1 + * + * @return Snak + */ + public function getMainSnak() { + return $this->mainSnak; + } + + /** + * Sets the main value snak of this statement. + * + * @since 0.1 + * + * @param Snak $mainSnak + */ + public function setMainSnak( Snak $mainSnak ) { + $this->mainSnak = $mainSnak; + } + + /** + * Returns the property value snaks making up the qualifiers for this statement. + * + * @since 0.1 + * + * @return Snaks + */ + public function getQualifiers() { + return $this->qualifiers; + } + + /** + * Sets the property value snaks making up the qualifiers for this statement. + * + * @since 0.1 + * + * @param Snaks $propertySnaks + */ + public function setQualifiers( Snaks $propertySnaks ) { + $this->qualifiers = $propertySnaks; + } + /** * Returns the references attached to this statement. * @@ -114,8 +203,6 @@ public function setRank( $rank ) { } /** - * @see Claim::getRank - * * @since 0.1 * * @return integer @@ -143,8 +230,6 @@ public function getHash() { } /** - * @see Claim::getAllSnaks. - * * In addition to the Snaks returned by Claim::getAllSnaks(), this also includes all * snaks from any References in this Statement. *