ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Slim\Http\RequestBody Class Reference

Provides a PSR-7 implementation of a reusable raw request body. More...

+ Inheritance diagram for Slim\Http\RequestBody:
+ Collaboration diagram for Slim\Http\RequestBody:

Public Member Functions

 __construct ()
 Create a new RequestBody. More...
 
- Public Member Functions inherited from Slim\Http\Stream
 __construct ($stream)
 Create a new Stream. More...
 
 getMetadata ($key=null)
 Get stream metadata as an associative array or retrieve a specific key. More...
 
 detach ()
 Separates any underlying resources from the stream. More...
 
 __toString ()
 Reads all data from the stream into a string, from the beginning to end. More...
 
 close ()
 Closes the stream and any underlying resources. More...
 
 getSize ()
 Get the size of the stream if known. More...
 
 tell ()
 Returns the current position of the file read/write pointer. More...
 
 eof ()
 Returns true if the stream is at the end of the stream. More...
 
 isReadable ()
 Returns whether or not the stream is readable. More...
 
 isWritable ()
 Returns whether or not the stream is writable. More...
 
 isSeekable ()
 Returns whether or not the stream is seekable. More...
 
 seek ($offset, $whence=SEEK_SET)
 Seek to a position in the stream. More...
 
 rewind ()
 Seek to the beginning of the stream. More...
 
 read ($length)
 Read data from the stream. More...
 
 write ($string)
 Write data to the stream. More...
 
 getContents ()
 Returns the remaining contents in a string. More...
 
 isPipe ()
 Returns whether or not the stream is a pipe. More...
 

Additional Inherited Members

- Data Fields inherited from Slim\Http\Stream
const FSTAT_MODE_S_IFIFO = 0010000
 Bit mask to determine if the stream is a pipe. More...
 
- Protected Member Functions inherited from Slim\Http\Stream
 isAttached ()
 Is a resource attached to this stream? More...
 
 attach ($newStream)
 Attach new resource to this object. More...
 
- Protected Attributes inherited from Slim\Http\Stream
 $stream
 
 $meta
 
 $readable
 
 $writable
 
 $seekable
 
 $size
 
 $isPipe
 
- Static Protected Attributes inherited from Slim\Http\Stream
static $modes
 

Detailed Description

Provides a PSR-7 implementation of a reusable raw request body.

Definition at line 14 of file RequestBody.php.

Constructor & Destructor Documentation

◆ __construct()

Slim\Http\RequestBody::__construct ( )

Create a new RequestBody.

Definition at line 19 of file RequestBody.php.

References Slim\Http\Stream\$stream, and Slim\Http\Stream\rewind().

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  }
rewind()
Seek to the beginning of the stream.
Definition: Stream.php:367
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: