Wikibase
MediaWiki Wikibase extension
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. More...
 
 getPropertyId ()
 
 getHash ()
 
 equals ( $target)
 
 serialize ()
 
 unserialize ( $serialized)
 
- Public Member Functions inherited from Wikibase\DataModel\Snak\Snak
 getType ()
 Returns a string that can be used to identify the type of snak. More...
 

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

◆ 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.

◆ 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: