FixedSizeStream
in package
implements
RequestStream
FinalYes
A Stream decorator that return Chunk with the same exact size.
Tags
Table of Contents
Interfaces
- RequestStream
- Provides method to convert a input into string or chunks.
Properties
- $chunkSize : int
- $content : RequestStream
Methods
- create() : FixedSizeStream
- getIterator() : Traversable
- hash() : string
- length() : int|null
- Length in bytes.
- stringify() : string
- __construct() : mixed
Properties
$chunkSize
private
int
$chunkSize
$content
private
RequestStream
$content
Methods
create()
public
static create(RequestStream $content[, int $chunkSize = 64 * 1024 ]) : FixedSizeStream
Parameters
- $content : RequestStream
- $chunkSize : int = 64 * 1024
Return values
FixedSizeStreamgetIterator()
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|nullstringify()
public
stringify() : string
Return values
string__construct()
private
__construct(RequestStream $content[, int $chunkSize = 64 * 1024 ]) : mixed
Parameters
- $content : RequestStream
- $chunkSize : int = 64 * 1024