private function makeAttachmentsResult(array $statements, $count, array $opts)
{
$boundary = Helpers::MULTIPART_BOUNDARY;
$eol = static::EOL;
$this->emit("--{$boundary}{$eol}");
$this->emit("Content-Type:application/json{$eol}{$eol}");
$this->makeStatementsResult($statements, $count, $opts);
$attachments = $this->statements->getAttachments($statements, $opts);
foreach ($attachments as $attachment) {
$this->emit("{$eol}--{$boundary}{$eol}" . 'Content-Type:' . $attachment->content_type . $eol . 'Content-Transfer-Encoding:binary' . $eol . 'X-Experience-API-Hash:' . $attachment->hash . $eol . $eol);
while (!feof($attachment->content)) {
$this->emit(fread($attachment->content, 8192));
}
fclose($attachment->content);
}
$this->emit("{$eol}--{$boundary}--");
}