ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
RequestBody.php
Go to the documentation of this file.
1<?php
9namespace Slim\Http;
10
14class RequestBody extends Body
15{
19 public function __construct()
20 {
21 $stream = fopen('php://temp', 'w+');
22 stream_copy_to_stream(fopen('php://input', 'r'), $stream);
24
25 parent::__construct($stream);
26 }
27}
An exception for terminatinating execution or to throw for unit testing.
Body.
Definition: Body.php:20
Provides a PSR-7 implementation of a reusable raw request body.
Definition: RequestBody.php:15
__construct()
Create a new RequestBody.
Definition: RequestBody.php:19
rewind()
Seek to the beginning of the stream.
Definition: Stream.php:367
Slim Framework (https://slimframework.com)
Definition: Body.php:9