public function get_discussion_summary_from_stdclass(
        stdClass $discussion,
        stdClass $firstpost,
        stdClass $firstpostauthor,
        stdClass $latestpostauthor
    ) : discussion_summary_entity {

        $firstpostauthorentity = $this->get_author_from_stdclass($firstpostauthor);
        return new discussion_summary_entity(
            $this->get_discussion_from_stdclass($discussion),
            $this->get_post_from_stdclass($firstpost, $firstpostauthorentity),
            $firstpostauthorentity,
            $this->get_author_from_stdclass($latestpostauthor)
        );
    }
public function get_discussion_summary_from_stdclass(
        stdClass $discussion,
        stdClass $firstpost,
        stdClass $firstpostauthor,
        stdClass $latestpostauthor
    ) : discussion_summary_entity {

        $firstpostauthorentity = $this->get_author_from_stdclass($firstpostauthor);
        return new discussion_summary_entity(
            $this->get_discussion_from_stdclass($discussion),
            $this->get_post_from_stdclass($firstpost, $firstpostauthorentity),
            $firstpostauthorentity,
            $this->get_author_from_stdclass($latestpostauthor)
        );
    }
public function get_discussion_summary_from_stdclass ( stdClass $ discussion , stdClass $ firstpost , stdClass $ firstpostauthor , stdClass $ latestpostauthor ) : discussion_summary_entity { $ firstpostauthorentity = $ this -> get_author_from_stdclass ( $ firstpostauthor ) ; return new discussion_summary_entity ( $ this -> get_discussion_from_stdclass ( $ discussion ) , $ this -> get_post_from_stdclass ( $ firstpost , $ firstpostauthorentity ) , $ firstpostauthorentity , $ this -> get_author_from_stdclass ( $ latestpostauthor ) ) ; }
Create a discussion summary enttiy from stdClasses.

@param stdClass $discussion The discussion record
@param stdClass $firstpost A post record for the first post in the discussion
@param stdClass $firstpostauthor A user record for the author of the first post
@param stdClass $latestpostauthor A user record for the author of the latest post in the discussion
@return discussion_summary_entity
Create a discussion summary enttiy from stdClasses .