VersionPress\Database\DbSchemaInfo::getPrefixedTableName PHP Method

getPrefixedTableName() public method

For something like "post", returns "wp_posts"
public getPrefixedTableName ( $entityName ) : string
$entityName
return string
    public function getPrefixedTableName($entityName)
    {
        return $this->prefix . $this->getTableName($entityName);
    }

Usage Example

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::getPrefixedTableName