public function delete($table, $where, $parentIds) { if ($this->disabled) { return; } $entityInfo = $this->dbSchemaInfo->getEntityInfoByPrefixedTableName($table); if ($entityInfo) { $this->deleteEntity($table, $where, $parentIds); return; } $referenceDetails = $this->dbSchemaInfo->getMnReferenceDetails($this->dbSchemaInfo->trimPrefix($table)); if ($referenceDetails) { $this->deleteReference($referenceDetails, $where); } }
/** * Returns entity name for a table * * @param DbSchemaInfo $schema * @param string $table * @return mixed */ private function resolveEntityName($schema, $table) { $entity = $schema->getEntityInfoByPrefixedTableName($table); return $entity == null ? $schema->trimPrefix($table) : $entity->entityName; }