MediaWiki master
Stream.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Rest;
4
5use GuzzleHttp\Psr7;
6
7class Stream extends Psr7\Stream implements CopyableStreamInterface {
9 private $stream;
10
12 public function __construct( $stream, $options = [] ) {
13 $this->stream = $stream;
14 parent::__construct( $stream, $options );
15 }
16
18 public function copyToStream( $target ) {
19 stream_copy_to_stream( $this->stream, $target );
20 }
21}
copyToStream( $target)
Copy this stream to a specified stream resource.For some streams, this can be implemented without a t...
Definition Stream.php:18
__construct( $stream, $options=[])
Definition Stream.php:12
An interface for a stream with a copyToStream() function.