public static function hydrate(stdClass $review)
    {
        $hydrated = new ReviewEntity();

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

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

        if (isset($review->type)) {
            $hydrated->setType(ReviewTypeHydrator::hydrate($review->type));
        }

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

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

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

        return $hydrated;
    }
public static function hydrate(stdClass $review)
    {
        $hydrated = new ReviewEntity();

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

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

        if (isset($review->type)) {
            $hydrated->setType(ReviewTypeHydrator::hydrate($review->type));
        }

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

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

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

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

@param stdClass $review
@return ReviewEntity
Hydrate a review object into a ReviewEntity object