wiki.techinc.nl/includes/Rest/Stream.php
Tim Starling 3f0056a252 REST API initial commit
Add some of the basic REST API class hierarchies:

* EntryPoint
* Router
* Request
* Response
* Handler

The actual entry point file rest.php has been moved to a separate
commit, so this is just an unused library and service.

Bug: T221177
Change-Id: Ifca6bcb8a304e8e8b7f52b79c607bdcebf805cd1
2019-06-12 10:22:28 +10:00

18 lines
376 B
PHP

<?php
namespace MediaWiki\Rest;
use GuzzleHttp\Psr7;
class Stream extends Psr7\Stream implements CopyableStreamInterface {
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 );
}
}