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. | |
In particular, this relates to the new data model based on data items instead of data value classes with DB key arrays and singatures.
Definition at line 23 of file SMW_CompatibilityHelpers.php.
| static SMWCompatibilityHelpers::dataItemFromDBKeys | ( | $ | typeid, | |
| $ | dbkeys | |||
| ) | [static] |
Method to create a dataitem from a type ID and array of DB keys.
Throws SMWDataItemException if problems occur, to get our callers used to it.
| $typeid | string id for the given type | |
| $dbkeys | array of mixed |
Definition at line 35 of file SMW_CompatibilityHelpers.php.
References SMWDITime::CM_GREGORIAN, SMWDIUri::doUnserialize(), SMWDINumber::doUnserialize(), SMWDataValueFactory::getDataItemId(), SMWTypesValue::getTypeUriFromTypeId(), SMWContainerSemanticData::makeAnonymousContainer(), SMWTimeValue::parseTimeString(), smwfXMLContentEncode(), SMWDataItem::TYPE_BLOB, SMWDataItem::TYPE_BOOLEAN, SMWDataItem::TYPE_CONCEPT, SMWDataItem::TYPE_CONTAINER, SMWDataItem::TYPE_ERROR, SMWDataItem::TYPE_GEO, SMWDataItem::TYPE_NOTYPE, SMWDataItem::TYPE_NUMBER, SMWDataItem::TYPE_PROPERTY, SMWDataItem::TYPE_STRING, SMWDataItem::TYPE_TIME, SMWDataItem::TYPE_URI, and SMWDataItem::TYPE_WIKIPAGE.
Referenced by SMWSqlStubSemanticData::getPropertyValues(), and SMWSQLStore2::getPropertyValues().
| static SMWCompatibilityHelpers::getDBkeysFromDataItem | ( | SMWDataItem $ | dataItem | ) | [static] |
Compatibility function for computing the old getDBkeys() array for the new SMW data items.
| $dataItem | SMWDataItem |
Definition at line 119 of file SMW_CompatibilityHelpers.php.
References SMWDITime::PREC_YM, SMWDITime::PREC_YMD, SMWDITime::PREC_YMDT, SMWDataItem::TYPE_BLOB, 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 SMWSQLStore2QueryEngine::compileAttributeWhere(), SMWSQLStore2::prepareDBUpdates(), and SMWSQLStore2::prepareValueQuery().
| 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.
| $dataItemId | integer | |
| $typeid | 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.
| $dataItemId | integer | |
| $typeid | string | |
| $labelIndex | boolean, if true get the label index, else the value index |
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().
1.5.6