original_string: public function get_posts_exporter(
          stdClass $user,
          forum_entity $forum,
          discussion_entity $discussion,
          array $posts,
          array $authorsbyid = [],
          array $authorcontextids = [],
          array $attachmentsbypostid = [],
          array $groupsbyauthorid = [],
          post_read_receipt_collection_entity $readreceiptcollection = null,
          array $tagsbypostid = [],
          array $ratingbypostid = [],
          bool $includehtml = false
      ) : posts_exporter {
          return new posts_exporter(
              $posts,
              $authorsbyid,
              $authorcontextids,
              $attachmentsbypostid,
              $groupsbyauthorid,
              $tagsbypostid,
              $ratingbypostid,
              [
                  'capabilitymanager' => $this->managerfactory->get_capability_manager($forum),
                  'urlfactory' => $this->urlfactory,
                  'forum' => $forum,
                  'discussion' => $discussion,
                  'user' => $user,
                  'context' => $forum->get_context(),
                  'readreceiptcollection' => $readreceiptcollection,
                  'includehtml' => $includehtml
              ]
          );
      }
code: public function get_posts_exporter(
          stdClass $user,
          forum_entity $forum,
          discussion_entity $discussion,
          array $posts,
          array $authorsbyid = [],
          array $authorcontextids = [],
          array $attachmentsbypostid = [],
          array $groupsbyauthorid = [],
          post_read_receipt_collection_entity $readreceiptcollection = null,
          array $tagsbypostid = [],
          array $ratingbypostid = [],
          bool $includehtml = false
      ) : posts_exporter {
          return new posts_exporter(
              $posts,
              $authorsbyid,
              $authorcontextids,
              $attachmentsbypostid,
              $groupsbyauthorid,
              $tagsbypostid,
              $ratingbypostid,
              [
                  'capabilitymanager' => $this->managerfactory->get_capability_manager($forum),
                  'urlfactory' => $this->urlfactory,
                  'forum' => $forum,
                  'discussion' => $discussion,
                  'user' => $user,
                  'context' => $forum->get_context(),
                  'readreceiptcollection' => $readreceiptcollection,
                  'includehtml' => $includehtml
              ]
          );
      }
code_tokens: public function get_posts_exporter ( stdClass $ user , forum_entity $ forum , discussion_entity $ discussion , array $ posts , array $ authorsbyid = [ ] , array $ authorcontextids = [ ] , array $ attachmentsbypostid = [ ] , array $ groupsbyauthorid = [ ] , post_read_receipt_collection_entity $ readreceiptcollection = null , array $ tagsbypostid = [ ] , array $ ratingbypostid = [ ] , bool $ includehtml = false ) : posts_exporter { return new posts_exporter ( $ posts , $ authorsbyid , $ authorcontextids , $ attachmentsbypostid , $ groupsbyauthorid , $ tagsbypostid , $ ratingbypostid , [ 'capabilitymanager' => $ this -> managerfactory -> get_capability_manager ( $ forum ) , 'urlfactory' => $ this -> urlfactory , 'forum' => $ forum , 'discussion' => $ discussion , 'user' => $ user , 'context' => $ forum -> get_context ( ) , 'readreceiptcollection' => $ readreceiptcollection , 'includehtml' => $ includehtml ] ) ; }
docstring: Construct a new post exporter for the specified user and set of post.
  
  @param   stdClass        $user The user viewing the forum
  @param   forum_entity    $forum The forum being viewed
  @param   discussion_entity $discussion The discussion that the post is in
  @param   post_entity[]   $posts The set of posts to be exported
  @param   author_entity[] $authorsbyid List of authors indexed by author id
  @param   int[]           $authorcontextids List of authors context ids indexed by author id
  @param   array           $attachmentsbypostid List of attachments for each post indexed by post id
  @param   array           $groupsbyauthorid List of groups for the post authors indexed by author id
  @param   post_read_receipt_collection_entity|null $readreceiptcollection Details of read receipts for each post
  @param   array           $tagsbypostid List of tags for each post indexed by post id
  @param   rating[]        $ratingbypostid List of ratings for each post indexed by post id
  @param   bool            $includehtml Include some pre-constructed HTML in the export
  @return  post_exporter
docstring_tokens: Construct a new post exporter for the specified user and set of post .