StreamBodyRepository
class StreamBodyRepository implements BodyRepository
Traits
Properties
| protected null|resource|StreamInterface | $stream | The stream body. |
|
| protected StreamInterface|null | $resourceStream | The stream that wraps a resource body. |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Create a stream body repository.
Set the repository value.
Get the stream from the repository.
Get the stream from the repository.
Determine if the repository is empty.
Determine if the repository is not empty.
Convert the body repository into a stream.
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
at line 34
__construct(mixed $value = null)
Create a stream body repository.
at line 45
BodyRepository
set(mixed $value)
Set the repository value.
at line 68
mixed
all()
Get the stream from the repository.
at line 78
mixed
get()
Get the stream from the repository.
Alias of "all" method.
at line 86
bool
isEmpty()
Determine if the repository is empty.
at line 94
bool
isNotEmpty()
Determine if the repository is not empty.
at line 102
StreamInterface
toStream()
Convert the body repository into a stream.