2019-05-09 01:36:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MediaWiki\Rest;
|
|
|
|
|
|
|
|
|
|
use GuzzleHttp\Psr7;
|
|
|
|
|
|
|
|
|
|
class Stream extends Psr7\Stream implements CopyableStreamInterface {
|
2024-09-07 19:49:56 +00:00
|
|
|
/** @var resource */
|
2019-05-09 01:36:18 +00:00
|
|
|
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 );
|
|
|
|
|
}
|
|
|
|
|
}
|