Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataModel\Snak\PropertyValueSnak Class Reference

Class representing a property value snak. More...

+ Inheritance diagram for Wikibase\DataModel\Snak\PropertyValueSnak:
+ Collaboration diagram for Wikibase\DataModel\Snak\PropertyValueSnak:

Public Member Functions

 __construct ( $propertyId, DataValue $dataValue)
 Support for passing in an EntityId instance that is not a PropertyId instance has been deprecated since 0.5.
 
 getDataValue ()
 Returns the value of the property value snak.
 
 getSerializationForHash ()
 The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.
 
 serialize ()
 
 unserialize ( $serialized)
 
 __serialize ()
 
 __unserialize (array $serialized)
 
 getType ()
 
- Public Member Functions inherited from Wikibase\DataModel\Snak\SnakObject
 __construct ( $propertyId)
 Support for passing in an EntityId instance that is not a PropertyId instance has been deprecated since 0.5.
 
 getPropertyId ()
 
 getHash ()
 
 equals ( $target)
 

Protected Attributes

 $dataValue
 
- Protected Attributes inherited from Wikibase\DataModel\Snak\SnakObject
 $propertyId
 

Private Member Functions

 getDataValueSerializationForHash ()
 The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.
 

Detailed Description

Class representing a property value snak.

See https://www.mediawiki.org/wiki/Wikibase/DataModel#PropertyValueSnak

Since
0.1
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataModel\Snak\PropertyValueSnak::__construct (   $propertyId,
DataValue  $dataValue 
)

Support for passing in an EntityId instance that is not a PropertyId instance has been deprecated since 0.5.

Since
0.1
Parameters
PropertyId | EntityId | int$propertyId
DataValue$dataValue

Member Function Documentation

◆ __serialize()

Wikibase\DataModel\Snak\PropertyValueSnak::__serialize ( )

◆ __unserialize()

Wikibase\DataModel\Snak\PropertyValueSnak::__unserialize ( array  $serialized)

◆ getDataValue()

Wikibase\DataModel\Snak\PropertyValueSnak::getDataValue ( )

Returns the value of the property value snak.

Since
0.1
Returns
DataValue

◆ getDataValueSerializationForHash()

Wikibase\DataModel\Snak\PropertyValueSnak::getDataValueSerializationForHash ( )
private

The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.

Returns
string

◆ getSerializationForHash()

Wikibase\DataModel\Snak\PropertyValueSnak::getSerializationForHash ( )

The serialization to use for hashing, for compatibility reasons this is equivalent to the old (pre 7.4) PHP serialization.

Returns
string

Reimplemented from Wikibase\DataModel\Snak\SnakObject.

◆ getType()

Wikibase\DataModel\Snak\PropertyValueSnak::getType ( )
See also
Snak::getType
Since
0.2
Returns
string

Implements Wikibase\DataModel\Snak\Snak.

◆ serialize()

Wikibase\DataModel\Snak\PropertyValueSnak::serialize ( )
See also
Serializable::serialize
Since
7.0 serialization format changed in an incompatible way
Returns
string

Reimplemented from Wikibase\DataModel\Snak\SnakObject.

◆ unserialize()

Wikibase\DataModel\Snak\PropertyValueSnak::unserialize (   $serialized)
See also
Serializable::unserialize
Since
0.1
Parameters
string$serialized

Reimplemented from Wikibase\DataModel\Snak\SnakObject.

Member Data Documentation

◆ $dataValue

Wikibase\DataModel\Snak\PropertyValueSnak::$dataValue
protected

The documentation for this class was generated from the following file: