protected function parseQuery()
    {
        if (empty($this->lastLine) || $this->lastLineType != self::LINE_TYPE_QUERY) {
            $this->getNextLine(self::LINE_TYPE_QUERY);

            if (empty($this->lastLine)) {
                return false;
            }
        }

        $buffer = $this->handleStart($this->lastLine);

        // Associate last date with current query.
        $this->buffer[$this->key][self::PARAM_DATE] = $this->lastDateTime;

        // Associate last log position with current query.
        $this->buffer[$this->key][self::PARAM_POSITION] = $this->lastLogPosition;

        $this->getNextLine(self::LINE_TYPE_QUERY);

        if ($buffer['type'] == ActionTypes::DELETE || $buffer['type'] === ActionTypes::UPDATE) {
            $buffer['where'] = $this->handleStatement($this->lastLine, self::STATEMENT_TYPE_WHERE);
        }

        if ($buffer['type'] == ActionTypes::CREATE || $buffer['type'] === ActionTypes::UPDATE) {
            $buffer['set'] = $this->handleStatement($this->lastLine, self::STATEMENT_TYPE_SET);
        }

        return $buffer;
    }
protected function parseQuery()
    {
        if (empty($this->lastLine) || $this->lastLineType != self::LINE_TYPE_QUERY) {
            $this->getNextLine(self::LINE_TYPE_QUERY);

            if (empty($this->lastLine)) {
                return false;
            }
        }

        $buffer = $this->handleStart($this->lastLine);

        // Associate last date with current query.
        $this->buffer[$this->key][self::PARAM_DATE] = $this->lastDateTime;

        // Associate last log position with current query.
        $this->buffer[$this->key][self::PARAM_POSITION] = $this->lastLogPosition;

        $this->getNextLine(self::LINE_TYPE_QUERY);

        if ($buffer['type'] == ActionTypes::DELETE || $buffer['type'] === ActionTypes::UPDATE) {
            $buffer['where'] = $this->handleStatement($this->lastLine, self::STATEMENT_TYPE_WHERE);
        }

        if ($buffer['type'] == ActionTypes::CREATE || $buffer['type'] === ActionTypes::UPDATE) {
            $buffer['set'] = $this->handleStatement($this->lastLine, self::STATEMENT_TYPE_SET);
        }

        return $buffer;
    }
protected function parseQuery ( ) { if ( empty ( $ this -> lastLine ) || $ this -> lastLineType != self :: LINE_TYPE_QUERY ) { $ this -> getNextLine ( self :: LINE_TYPE_QUERY ) ; if ( empty ( $ this -> lastLine ) ) { return false ; } } $ buffer = $ this -> handleStart ( $ this -> lastLine ) ; // Associate last date with current query. $ this -> buffer [ $ this -> key ] [ self :: PARAM_DATE ] = $ this -> lastDateTime ; // Associate last log position with current query. $ this -> buffer [ $ this -> key ] [ self :: PARAM_POSITION ] = $ this -> lastLogPosition ; $ this -> getNextLine ( self :: LINE_TYPE_QUERY ) ; if ( $ buffer [ 'type' ] == ActionTypes :: DELETE || $ buffer [ 'type' ] === ActionTypes :: UPDATE ) { $ buffer [ 'where' ] = $ this -> handleStatement ( $ this -> lastLine , self :: STATEMENT_TYPE_WHERE ) ; } if ( $ buffer [ 'type' ] == ActionTypes :: CREATE || $ buffer [ 'type' ] === ActionTypes :: UPDATE ) { $ buffer [ 'set' ] = $ this -> handleStatement ( $ this -> lastLine , self :: STATEMENT_TYPE_SET ) ; } return $ buffer ; }
Retrieves a query from the binlog.

@return null|array
Retrieves a query from the binlog .