Pheasant\Database\Binder::quote PHP 메소드

quote() 공개 메소드

Surrounds a string with quote marks, null is returned as NULL, bools converted to 1|empty string for compatibility
public quote ( $string ) : string
리턴 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);
            }
        }
    }