aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Rest/Stream.php
blob: 93785085d24efed2c88f8c0d0a7521ad6c360114 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

namespace MediaWiki\Rest;

use GuzzleHttp\Psr7;

class Stream extends Psr7\Stream implements CopyableStreamInterface {
	/** @var resource */
	private $stream;

	public function __construct( $stream, $options = [] ) {
		$this->stream = $stream;
		parent::__construct( $stream, $options );
	}

	public function copyToStream( $target ) {
		stream_copy_to_stream( $this->stream, $target );
	}
}