/** * Check if the given table can be used to store values of the given * type. This is needed to apply the type-based filtering in * getSemanticData(). * * @param $tableId string * @param $typeId string * @return boolean */ public static function tableFitsType($tableId, $typeId) { $dataItemId = SMWDataValueFactory::getDataItemId($typeId); if ($tableId == self::findDiTypeTableId($dataItemId)) { return true; } foreach (self::$special_tables as $propertyKey => $specialTableId) { if ($specialTableId == $tableId) { $diProperty = new SMWDIProperty($propertyKey, false); $propertyTypeId = $diProperty->findPropertyTypeId(); if ($typeId == $propertyTypeId) { return true; } } } return false; }