MediaWiki REL1_37
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 {
8 private $stream;
9
10 public function __construct( $stream, $options = [] ) {
11 $this->stream = $stream;
12 parent::__construct( $stream, $options );
13 }
14
15 public function copyToStream( $target ) {
16 stream_copy_to_stream( $this->stream, $target );
17 }
18}
copyToStream( $target)
Copy this stream to a specified stream resource.
Definition Stream.php:15
__construct( $stream, $options=[])
Definition Stream.php:10
An interface for a stream with a copyToStream() function.