VersionPress\Database\DbSchemaInfo::getTableName PHP Method

getTableName() public method

For something like "post", returns "posts"
public getTableName ( $entityName ) : string
$entityName
return string
    public function getTableName($entityName)
    {
        $tableName = $this->isEntity($entityName) ? $this->getEntityInfo($entityName)->tableName : $entityName;
        return $tableName;
    }

Usage Example

コード例 #1
0
 private function saveId($entityName, $id, $vpId)
 {
     $vpIdTableName = $this->schemaInfo->getPrefixedTableName('vp_id');
     $tableName = $this->schemaInfo->getTableName($entityName);
     $query = "INSERT INTO {$vpIdTableName} (`vp_id`, `table`, `id`) VALUES (UNHEX('{$vpId}'), \"{$tableName}\", {$id})";
     $this->database->query($query);
 }
All Usage Examples Of VersionPress\Database\DbSchemaInfo::getTableName