public function quote( $value, array $modifiers = [] )
    {
        if( is_null( $value ) ) {
            $value = 'NULL';
        } elseif( is_bool( $value ) ) {
            $value = $value ? 'TRUE' : 'FALSE';
        } elseif( is_int( $value ) ) {
            $value = (string) $value;
        } elseif( $value instanceof SqlInterface ) {
            $value = $value->parse( $this );
        } else {
            $value = "'" . pg_escape_string( $this->resource->get(), $value ) . "'";
        }

        foreach( $modifiers as $modifier ) {
            $modifier( $value );
        }

        return $value;
    }
public function quote( $value, array $modifiers = [] )
    {
        if( is_null( $value ) ) {
            $value = 'NULL';
        } elseif( is_bool( $value ) ) {
            $value = $value ? 'TRUE' : 'FALSE';
        } elseif( is_int( $value ) ) {
            $value = (string) $value;
        } elseif( $value instanceof SqlInterface ) {
            $value = $value->parse( $this );
        } else {
            $value = "'" . pg_escape_string( $this->resource->get(), $value ) . "'";
        }

        foreach( $modifiers as $modifier ) {
            $modifier( $value );
        }

        return $value;
    }
public function quote ( $ value , array $ modifiers = [ ] ) { if ( is_null ( $ value ) ) { $ value = 'NULL' ; } elseif ( is_bool ( $ value ) ) { $ value = $ value ? 'TRUE' : 'FALSE' ; } elseif ( is_int ( $ value ) ) { $ value = ( string ) $ value ; } elseif ( $ value instanceof SqlInterface ) { $ value = $ value -> parse ( $ this ) ; } else { $ value = "'" . pg_escape_string ( $ this -> resource -> get ( ) , $ value ) . "'" ; } foreach ( $ modifiers as $ modifier ) { $ modifier ( $ value ) ; } return $ value ; }
Return a value made safe for insertion into a database

@param array $modifiers Array of \Closures to be applied before returning
@return string
Return a value made safe for insertion into a database