ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
RequestBody.php
Go to the documentation of this file.
1 <?php
9 namespace Slim\Http;
10 
14 class 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);
23  rewind($stream);
24 
25  parent::__construct($stream);
26  }
27 }
Slim Framework (https://slimframework.com)
Definition: Body.php:9
Provides a PSR-7 implementation of a reusable raw request body.
Definition: RequestBody.php:14
rewind()
Seek to the beginning of the stream.
Definition: Stream.php:367
Body.
Definition: Body.php:19
__construct()
Create a new RequestBody.
Definition: RequestBody.php:19