RewindableStream
in package
implements
RequestStream
FinalYes
Provides a Stream that can be read several time.
This is for internal use only. One cannot iterate only over a few items of the stream. If iterating over a stream, the full stream must be consumed before calling methods:
- stringify
- length
- hash
Tags
Table of Contents
Interfaces
- RequestStream
- Provides method to convert a input into string or chunks.
Properties
- $content : RequestStream
- $fallback : RequestStream|null
Methods
- create() : RewindableStream
- getIterator() : Traversable
- hash() : string
- length() : int|null
- Length in bytes.
- read() : void
- stringify() : string
- __construct() : mixed
Properties
$content
private
RequestStream
$content
$fallback
private
RequestStream|null
$fallback
Methods
create()
public
static create(RequestStream $content) : RewindableStream
Parameters
- $content : RequestStream
Return values
RewindableStreamgetIterator()
public
getIterator() : Traversable
Return values
Traversablehash()
public
hash([string $algo = 'sha256' ][, bool $raw = false ]) : string
Parameters
- $algo : string = 'sha256'
- $raw : bool = false
Return values
stringlength()
Length in bytes.
public
length() : int|null
Return values
int|nullread()
public
read() : void
stringify()
public
stringify() : string
Return values
string__construct()
private
__construct(RequestStream $content) : mixed
Parameters
- $content : RequestStream