/** * Добавляет новое свойство БД. * @global type $DB * @param \Property $property * @param string $tableName */ static function insertProperty($property, $tableName) { global $DB; $sql = 'INSERT INTO ' . $tableName . ' (PARENT_ID, TYPE, VALUE) VALUES (' . $property->getParentId() . ', "' . $DB->EscapeString($property->getType()) . '", "' . $DB->EscapeString($property->getValue()) . '")'; $DB->Query($sql); $property->setId($DB->LastID()); }
/** * {@inheritdoc} */ public function isReference(Property $property) { return in_array($property->getType(), ['startNode', 'endNode'], true); }
/** * {@inheritdoc} */ public function isReference(Property $property) { return $property->getType() === 'relationship'; }