public function quote($string)
    {
        if(is_null($string)) {
            return 'NULL';
        }
        else if(is_bool($string)) {
            return $string === true ? 1 : "''";
        }
        else {
            return sprintf("'%s'", $string);
        }
    }
public function quote($string)
    {
        if(is_null($string)) {
            return 'NULL';
        }
        else if(is_bool($string)) {
            return $string === true ? 1 : "''";
        }
        else {
            return sprintf("'%s'", $string);
        }
    }
public function quote ( $ string ) { if ( is_null ( $ string ) ) { return 'NULL' ; } else if ( is_bool ( $ string ) ) { return $ string === true ? 1 : "''" ; } else { return sprintf ( "'%s'" , $ string ) ; } }
Surrounds a string with quote marks, null is returned as NULL, bools
converted to 1|empty string for compatibility
@return string
Surrounds a string with quote marks null is returned as NULL bools converted to 1|empty string for compatibility