public static function hydrate(stdClass $comment)
    {
        $hydrated = new CommentEntity();

        if (isset($comment->id)) {
            $hydrated->setId($comment->id);
        }

        if (isset($comment->comment)) {
            $hydrated->setComment($comment->comment);
        }

        if (isset($comment->created_at)) {
            $hydrated->setCreatedAt(new DateTime($comment->created_at));
        }

        if (isset($comment->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($comment->created_by));
        }

        if (isset($comment->source)) {
            $hydrated->setSource($comment->source);
        }

        if (isset($comment->issue)) {
            $hydrated->setIssue(IssueHydrator::hydrate($comment->issue));
        }

        return $hydrated;
    }
public static function hydrate(stdClass $comment)
    {
        $hydrated = new CommentEntity();

        if (isset($comment->id)) {
            $hydrated->setId($comment->id);
        }

        if (isset($comment->comment)) {
            $hydrated->setComment($comment->comment);
        }

        if (isset($comment->created_at)) {
            $hydrated->setCreatedAt(new DateTime($comment->created_at));
        }

        if (isset($comment->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($comment->created_by));
        }

        if (isset($comment->source)) {
            $hydrated->setSource($comment->source);
        }

        if (isset($comment->issue)) {
            $hydrated->setIssue(IssueHydrator::hydrate($comment->issue));
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ comment ) { $ hydrated = new CommentEntity ( ) ; if ( isset ( $ comment -> id ) ) { $ hydrated -> setId ( $ comment -> id ) ; } if ( isset ( $ comment -> comment ) ) { $ hydrated -> setComment ( $ comment -> comment ) ; } if ( isset ( $ comment -> created_at ) ) { $ hydrated -> setCreatedAt ( new DateTime ( $ comment -> created_at ) ) ; } if ( isset ( $ comment -> created_by ) ) { $ hydrated -> setCreatedBy ( UserHydrator :: hydrate ( $ comment -> created_by ) ) ; } if ( isset ( $ comment -> source ) ) { $ hydrated -> setSource ( $ comment -> source ) ; } if ( isset ( $ comment -> issue ) ) { $ hydrated -> setIssue ( IssueHydrator :: hydrate ( $ comment -> issue ) ) ; } return $ hydrated ; }
Hydrate a comment object into a CommentEntity object

@param stdClass $comment
@return CommentEntity
Hydrate a comment object into a CommentEntity object