StreamBodyRepository
class StreamBodyRepository implements BodyRepository
Traits
Properties
| protected null|resource|StreamInterface | $stream | The stream 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 29
__construct(mixed $value = null)
Create a stream body repository.
at line 40
BodyRepository
set(mixed $value)
Set the repository value.
at line 56
mixed
all()
Get the stream from the repository.
at line 66
mixed
get()
Get the stream from the repository.
Alias of "all" method.
at line 74
bool
isEmpty()
Determine if the repository is empty.
at line 82
bool
isNotEmpty()
Determine if the repository is not empty.
at line 90
StreamInterface
toStream()
Convert the body repository into a stream.