FormBodyRepository
class FormBodyRepository extends ArrayBodyRepository implements Stringable
Traits
Properties
| protected array<array-key, mixed> | $data | The repository data. |
from ArrayBodyRepository |
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.
Add an element to the repository.
Get a value from the repository.
Remove an item from the repository.
Convert into a string.
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.
in
ArrayBodyRepository at line 28
__construct(array $value = [])
Create an array body repository.
in
ArrayBodyRepository at line 39
BodyRepository
set(mixed $value)
Set the repository value.
in
ArrayBodyRepository at line 56
MergeableBody
merge(array ...$arrays)
Merge arrays into the repository.
in
ArrayBodyRepository at line 69
ArrayBodyRepository
add(string|int|null $key = null, mixed $value = null)
Add an element to the repository.
in
ArrayBodyRepository at line 83
mixed
all()
Get the raw data in the repository.
in
ArrayBodyRepository at line 96
mixed
get(string|int|null $key = null, mixed $default = null)
Get a value from the repository.
Alias of all().
in
ArrayBodyRepository at line 111
ArrayBodyRepository
remove(string|int $key)
Remove an item from the repository.
in
ArrayBodyRepository at line 123
bool
isEmpty()
Determine if the repository is empty.
in
ArrayBodyRepository at line 133
bool
isNotEmpty()
Determine if the repository is not empty.
in
CreatesStreamFromString at line 15
StreamInterface
toStream()
Convert the body repository into a stream.
at line 18
string
__toString()
Convert into a string.