diff --git a/README.md b/README.md index fffd698..ec228f0 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,6 @@ $stream = new Stream(fopen(...)); // creates a new stream from the given string $stream = (new StreamFactory)->createStream('Hello, world!'); -// creates a new stream from the request body -$stream = (new StreamFactory)->createStreamFromRequestBody(); - // creates a new stream from the given filename or URI $stream = (new StreamFactory)->createStreamFromFile('http://php.net/', 'rb'); diff --git a/src/StreamFactory.php b/src/StreamFactory.php index cbff554..2abc15d 100644 --- a/src/StreamFactory.php +++ b/src/StreamFactory.php @@ -38,22 +38,6 @@ public function createStream(string $content = '') : StreamInterface return new Stream($resource); } - /** - * Creates a stream from the request body - * - * @return StreamInterface - */ - public function createStreamFromRequestBody() : StreamInterface - { - $resource = \fopen('php://temp', 'r+b'); - - \stream_copy_to_stream(\fopen('php://input', 'rb'), $resource); - - \rewind($resource); - - return new Stream($resource); - } - /** * {@inheritDoc} *