StringBodyRepository
class StringBodyRepository implements BodyRepository, Stringable
Traits
Properties
| protected string|null | $data | The repository data. |
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 string body repository.
Set the repository value.
Get the repository value.
Determine if the repository is empty.
Determine if the repository is not empty.
Convert the repository into a string.
Details
in
CreatesStreamFromString at line 15
StreamInterface
toStream()
Convert the body repository into a stream.
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 25
__construct(string|null $value = null)
Create a string body repository.
at line 36
BodyRepository
set(mixed $value)
Set the repository value.
at line 46
mixed
all()
Get the repository value.
at line 54
bool
isEmpty()
Determine if the repository is empty.
at line 62
bool
isNotEmpty()
Determine if the repository is not empty.
at line 70
string
__toString()
Convert the repository into a string.