CI_DB_query_builder::_is_literal PHP Method

_is_literal() protected method

Determines if a string represents a literal value or a field name
protected _is_literal ( string $str ) : boolean
$str string
return boolean
    protected function _is_literal($str)
    {
        $str = trim($str);
        if (empty($str) or ctype_digit($str) or (string) (double) $str === $str or in_array(strtoupper($str), array('TRUE', 'FALSE'), TRUE)) {
            return TRUE;
        }
        static $_str;
        if (empty($_str)) {
            $_str = $this->_escape_char !== '"' ? array('"', "'") : array("'");
        }
        return in_array($str[0], $_str, TRUE);
    }