public getEntityInfoByTableName ( $tableName ) : |
||
$tableName | ||
리턴 |
public function getEntityInfoByTableName($tableName)
{
$entityNames = $this->getAllEntityNames();
foreach ($entityNames as $entityName) {
$entityInfo = $this->getEntityInfo($entityName);
if ($entityInfo->tableName === $tableName) {
return $entityInfo;
}
}
return null;
}
private function tryToUseIdsFromDatabase() { $vpidTableExists = (bool) $this->database->get_row("SHOW TABLES LIKE '{$this->database->vp_id}'"); if (!$vpidTableExists) { return; } $vpidRows = $this->database->get_results("SELECT `table`, id, HEX(vp_id) vp_id FROM {$this->database->vp_id}"); foreach ($vpidRows as $row) { $this->idCache[$this->dbSchema->getEntityInfoByTableName($row->table)->entityName][$row->id] = $row->vp_id; } }