protected function proceedComment(array $comment, array $changeSet, $key)
    {
        $reviewer = $this->proceedPerson($comment['reviewer']);

        // A comment don`t have a unique identifier, so we must generate an ID on our own.
        // Changeset Id + Reviewer ID + Key + Timestamp. This combination is "unique enough".
        // Is this comment already in database?
        $commentRecord = $this->getGerritCommentByIdentifier(
            $changeSet['id'],
            $reviewer['id'],
            $comment['timestamp'],
            $key
        );
        if ($commentRecord === false) {
            $commentData = array(
                'changeset' => $changeSet['id'],
                'timestamp' => $comment['timestamp'],
                'reviewer' => $reviewer['id'],
                'message' => $comment['message'],
                'number' => $key
            );
            $this->getDatabase()->insertRecord(Database::TABLE_COMMENT, $commentData);

            $comment = $this->unsetKeys($comment, array('timestamp', 'reviewer', 'message'));
            $this->checkIfAllValuesWereProceeded($comment, 'Comment');
        }
    }
protected function proceedComment(array $comment, array $changeSet, $key)
    {
        $reviewer = $this->proceedPerson($comment['reviewer']);

        // A comment don`t have a unique identifier, so we must generate an ID on our own.
        // Changeset Id + Reviewer ID + Key + Timestamp. This combination is "unique enough".
        // Is this comment already in database?
        $commentRecord = $this->getGerritCommentByIdentifier(
            $changeSet['id'],
            $reviewer['id'],
            $comment['timestamp'],
            $key
        );
        if ($commentRecord === false) {
            $commentData = array(
                'changeset' => $changeSet['id'],
                'timestamp' => $comment['timestamp'],
                'reviewer' => $reviewer['id'],
                'message' => $comment['message'],
                'number' => $key
            );
            $this->getDatabase()->insertRecord(Database::TABLE_COMMENT, $commentData);

            $comment = $this->unsetKeys($comment, array('timestamp', 'reviewer', 'message'));
            $this->checkIfAllValuesWereProceeded($comment, 'Comment');
        }
    }
protected function proceedComment ( array $ comment , array $ changeSet , $ key ) { $ reviewer = $ this -> proceedPerson ( $ comment [ 'reviewer' ] ) ; // A comment don`t have a unique identifier, so we must generate an ID on our own. // Changeset Id + Reviewer ID + Key + Timestamp. This combination is "unique enough". // Is this comment already in database? $ commentRecord = $ this -> getGerritCommentByIdentifier ( $ changeSet [ 'id' ] , $ reviewer [ 'id' ] , $ comment [ 'timestamp' ] , $ key ) ; if ( $ commentRecord === false ) { $ commentData = array ( 'changeset' => $ changeSet [ 'id' ] , 'timestamp' => $ comment [ 'timestamp' ] , 'reviewer' => $ reviewer [ 'id' ] , 'message' => $ comment [ 'message' ] , 'number' => $ key ) ; $ this -> getDatabase ( ) -> insertRecord ( Database :: TABLE_COMMENT , $ commentData ) ; $ comment = $ this -> unsetKeys ( $ comment , array ( 'timestamp' , 'reviewer' , 'message' ) ) ; $ this -> checkIfAllValuesWereProceeded ( $ comment , 'Comment' ) ; } }
Proceeds a single comment.

Comments are not updateable. So there is no need to provide an update mechanism here.

@param array $comment The current comment
@param array $changeSet The current changeset
@param integer $key The $key value of the foreach loop of comments (order number)
@return void
Proceeds a single comment .