/** * @param array $specialProperties */ private function buildPropertyTablesForSpecialProperties(array $specialProperties) { foreach ($specialProperties as $propertyKey) { $this->addPropertyTable(DataTypeRegistry::getInstance()->getDataItemId(DIProperty::getPredefinedPropertyTypeId($propertyKey)), $this->getTablePrefix() . strtolower($propertyKey), $propertyKey); } // Redirect table uses another subject scheme for historic reasons // TODO This should be changed if possible $redirectTableName = $this->getTablePrefix() . '_redi'; if (isset($this->propertyTables[$redirectTableName])) { $this->propertyTables[$redirectTableName]->setUsesIdSubject(false); } }
protected function isRegisteredPropertyId($propertyId, $cachedProperties) { return DIProperty::getPredefinedPropertyTypeId($propertyId) === '' || array_key_exists($propertyId, $cachedProperties); }
/** * @param array $properties */ private function addTableDefinitionForFixedProperties(array $properties) { foreach ($properties as $propertyKey => $propetyTableSuffix) { // Either as plain index array containing the property key or as associated // array with property key => tableSuffix $propertyKey = is_int($propertyKey) ? $propetyTableSuffix : $propertyKey; $this->addPropertyTable(DataTypeRegistry::getInstance()->getDataItemId(DIProperty::getPredefinedPropertyTypeId($propertyKey)), $this->fixedPropertyTablePrefix . strtolower($propetyTableSuffix), $propertyKey); } }