Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
SWLPropertyChange Class Reference

Public Member Functions

 __construct ($oldValue, $newValue)
 
 getOldValue ()
 
 getNewValue ()
 
 getType ()
 
 getSerialization ()
 

Static Public Member Functions

static newFromSerialization (SMWDIProperty $property, $oldValue, $newValue)
 

Public Attributes

const TYPE_INSERT = 0
 
const TYPE_UPDATE = 1
 
const TYPE_DELETE = 2
 

Constructor & Destructor Documentation

◆ __construct()

SWLPropertyChange::__construct (   $oldValue,
  $newValue 
)

Create a new SWLPropertyChange.

Parameters
SMWDataItem$oldValue
SMWDataItem$newValue

Member Function Documentation

◆ getNewValue()

SWLPropertyChange::getNewValue ( )

returns the new value, or null if there is none.

Returns
SMWDataItem or null

◆ getOldValue()

SWLPropertyChange::getOldValue ( )

Retruns the old value, or null if there is none.

Returns
SMWDataItem or null

◆ getSerialization()

SWLPropertyChange::getSerialization ( )

Returns a serialized version of the change, suitable to do equal comparisions but not to unserialize.

Returns
string

◆ getType()

SWLPropertyChange::getType ( )

Returns the type of the change.

Returns
element of the SWLPropertyChange::TYPE_ enum

◆ newFromSerialization()

static SWLPropertyChange::newFromSerialization ( SMWDIProperty  $property,
  $oldValue,
  $newValue 
)
static

Creates and returns a new SWLPropertyChange instance from a serialization.

Parameters
string | null$oldValue
string | null$newValue
Returns
SWLPropertyChange

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

About | General disclaimer | Privacy policy