Bluz\Db\Db::quoteIdentifier PHP Method

quoteIdentifier() public method

Quote a string so it can be safely used as a table or column name
public quoteIdentifier ( string $identifier ) : string
$identifier string
return string
    public function quoteIdentifier($identifier)
    {
        // switch statement for DB type
        switch ($this->connect['type']) {
            case 'mysql':
                return '`' . str_replace('`', '``', $identifier) . '`';
            case 'postgresql':
            case 'sqlite':
            default:
                return '"' . str_replace('"', '\\' . '"', $identifier) . '"';
        }
    }