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

Base class for snaks. More...

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

Public Member Functions

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

Protected Attributes

 $propertyId
 

Detailed Description

Base class for snaks.

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

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

Constructor & Destructor Documentation

◆ __construct()

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.

Since
0.1
Parameters
PropertyId | EntityId | int$propertyId
Exceptions
InvalidArgumentException

Member Function Documentation

◆ __serialize()

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

◆ __unserialize()

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

◆ equals()

Wikibase\DataModel\Snak\SnakObject::equals ( $target)
Since
0.3
Parameters
mixed$target
Returns
bool

Implements Wikibase\DataModel\Snak\Snak.

◆ getHash()

Wikibase\DataModel\Snak\SnakObject::getHash ( )
Returns
string

Implements Wikibase\DataModel\Snak\Snak.

◆ getPropertyId()

Wikibase\DataModel\Snak\SnakObject::getPropertyId ( )
See also
PropertyIdProvider::getPropertyId
Since
0.1
Returns
PropertyId

Implements Wikibase\DataModel\PropertyIdProvider.

◆ getSerializationForHash()

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

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

Returns
string

Reimplemented in Wikibase\DataModel\Snak\PropertyValueSnak.

◆ serialize()

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

Reimplemented in Wikibase\DataModel\Snak\PropertyValueSnak.

◆ unserialize()

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

Reimplemented in Wikibase\DataModel\Snak\PropertyValueSnak.

Member Data Documentation

◆ $propertyId

Wikibase\DataModel\Snak\SnakObject::$propertyId
protected

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