3 namespace MediaWiki\Rest
;
6 * An interface for a stream with a copyToStream() function.
8 interface CopyableStreamInterface
extends \Psr\Http\Message\StreamInterface
{
10 * Copy this stream to a specified stream resource. For some streams,
11 * this can be implemented without a tight loop in PHP code.
13 * Equivalent to reading from the object until EOF and writing the
14 * resulting data to $stream. The position will be advanced to the end.
16 * Note that $stream is not a StreamInterface object.
18 * @param resource $stream Destination
20 function copyToStream( $stream );