SMWCompatibilityHelpers Class Reference
[Semantic MediaWiki]

Helper class to collect various static functions that provide some interfaces used in SMW 1.6 that are no longer available in SMW 1.7. More...

List of all members.

Static Public Member Functions

static dataItemFromDBKeys ($typeid, $dbkeys)
 Method to create a dataitem from a type ID and array of DB keys.
static getDBkeysFromDataItem (SMWDataItem $dataItem)
 Compatibility function for computing the old getDBkeys() array for the new SMW data items.
static getSignatureFromDataItemId ($dataItemId, $typeid)
 Compatibility function for computing the old getSignature() string based on dataitem IDs.
static getIndexFromDataItemId ($dataItemId, $typeid, $labelIndex=false)
 Compatibility function for computing the old getValueIndex() and getLabelIndex() numbers based on dataitem IDs.


Detailed Description

Helper class to collect various static functions that provide some interfaces used in SMW 1.6 that are no longer available in SMW 1.7.

In particular, this relates to the new data model based on data items instead of data value classes with DB key arrays and singatures.

Since:
1.6
Note:
This class will vanish before SMW 1.7. Please change your code to not require the old interfaces at all.

Definition at line 23 of file SMW_CompatibilityHelpers.php.


Member Function Documentation

static SMWCompatibilityHelpers::dataItemFromDBKeys ( typeid,
dbkeys 
) [static]

static SMWCompatibilityHelpers::getDBkeysFromDataItem ( SMWDataItem dataItem  )  [static]

static SMWCompatibilityHelpers::getSignatureFromDataItemId ( dataItemId,
typeid 
) [static]

Compatibility function for computing the old getSignature() string based on dataitem IDs.

To maintain full compatibility, the typeid is relevant here, too.

Note:
Use SMWDataValueFactory::getDataItemId() if only the $typeid is known.
Parameters:
$dataItemId integer
$typeid string
Returns:
string

Definition at line 170 of file SMW_CompatibilityHelpers.php.

References SMWDataItem::TYPE_BOOLEAN, SMWDataItem::TYPE_CONCEPT, SMWDataItem::TYPE_CONTAINER, SMWDataItem::TYPE_GEO, SMWDataItem::TYPE_NUMBER, SMWDataItem::TYPE_PROPERTY, SMWDataItem::TYPE_STRING, SMWDataItem::TYPE_TIME, SMWDataItem::TYPE_URI, and SMWDataItem::TYPE_WIKIPAGE.

Referenced by SMWSQLStore2::getTypeSignature().

static SMWCompatibilityHelpers::getIndexFromDataItemId ( dataItemId,
typeid,
labelIndex = false 
) [static]

Compatibility function for computing the old getValueIndex() and getLabelIndex() numbers based on dataitem IDs.

To maintain full compatibility, the typeid is relevant here, too.

Note:
Use SMWDataValueFactory::getDataItemId() if only the $typeid is known.
Parameters:
$dataItemId integer
$typeid string
$labelIndex boolean, if true get the label index, else the value index
Returns:
string

Definition at line 206 of file SMW_CompatibilityHelpers.php.

References SMWDataItem::TYPE_BOOLEAN, SMWDataItem::TYPE_CONCEPT, SMWDataItem::TYPE_CONTAINER, SMWDataItem::TYPE_GEO, SMWDataItem::TYPE_NUMBER, SMWDataItem::TYPE_PROPERTY, SMWDataItem::TYPE_STRING, SMWDataItem::TYPE_TIME, SMWDataItem::TYPE_URI, and SMWDataItem::TYPE_WIKIPAGE.

Referenced by SMWSQLStore2::getTypeSignature().


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

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6