getMetadata()->getContentLength(); \GuzzleHttp\Psr7\copy_to_stream( $this->result, $sink, (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 ); $sink->seek(0); $this->result->close(); } function getResultClass() { return StreamInterface::class; } /** * @param StreamInterface $result */ function setResult($result) { $this->result = $result; } }