public function quote(Query $query)
    {
        $binder = $query->getValueBinder();
        $query->setValueBinder(false);

        if ($query->type() === 'insert') {
            $this->_quoteInsert($query);
        } elseif ($query->type() === 'update') {
            $this->_quoteUpdate($query);
        } else {
            $this->_quoteParts($query);
        }

        $query->traverseExpressions([$this, 'quoteExpression']);
        $query->setValueBinder($binder);

        return $query;
    }
public function quote(Query $query)
    {
        $binder = $query->getValueBinder();
        $query->setValueBinder(false);

        if ($query->type() === 'insert') {
            $this->_quoteInsert($query);
        } elseif ($query->type() === 'update') {
            $this->_quoteUpdate($query);
        } else {
            $this->_quoteParts($query);
        }

        $query->traverseExpressions([$this, 'quoteExpression']);
        $query->setValueBinder($binder);

        return $query;
    }
public function quote ( Query $ query ) { $ binder = $ query -> getValueBinder ( ) ; $ query -> setValueBinder ( false ) ; if ( $ query -> type ( ) === 'insert' ) { $ this -> _quoteInsert ( $ query ) ; } elseif ( $ query -> type ( ) === 'update' ) { $ this -> _quoteUpdate ( $ query ) ; } else { $ this -> _quoteParts ( $ query ) ; } $ query -> traverseExpressions ( [ $ this , 'quoteExpression' ] ) ; $ query -> setValueBinder ( $ binder ) ; return $ query ; }
Iterates over each of the clauses in a query looking for identifiers and
quotes them

@param \Cake\Database\Query $query The query to have its identifiers quoted
@return \Cake\Database\Query
Iterates over each of the clauses in a query looking for identifiers and quotes them