class FormBodyRepository extends ArrayBodyRepository implements Stringable

Traits

Properties

protected array<array-key, mixed> $data

The repository data.

from  ArrayBodyRepository

Methods

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.

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.

__construct(array $value = [])

Create an array body repository.

set(mixed $value)

Set the repository value.

merge(array ...$arrays)

Merge arrays into the repository.

add(string|int|null $key = null, mixed $value = null)

Add an element to the repository.

mixed
all()

Get the raw data in the repository.

mixed
get(string|int|null $key = null, mixed $default = null)

Get a value from the repository.

remove(string|int $key)

Remove an item from the repository.

bool
isEmpty()

Determine if the repository is empty.

bool
isNotEmpty()

Determine if the repository is not empty.

StreamInterface
toStream()

Convert the body repository into a stream.

string
__toString()

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.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

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.

Parameters

mixed $value
callable|null $callback
callable|null $default

Return Value

mixed

__construct(array $value = [])

Create an array body repository.

Parameters

array $value

BodyRepository set(mixed $value)

Set the repository value.

Parameters

mixed $value

Return Value

BodyRepository

MergeableBody merge(array ...$arrays)

Merge arrays into the repository.

Parameters

array ...$arrays

Return Value

MergeableBody

ArrayBodyRepository add(string|int|null $key = null, mixed $value = null)

Add an element to the repository.

Parameters

string|int|null $key
mixed $value

Return Value

ArrayBodyRepository

mixed all()

Get the raw data in the repository.

Return Value

mixed

mixed get(string|int|null $key = null, mixed $default = null)

Get a value from the repository.

Alias of all().

Parameters

string|int|null $key
mixed $default

Return Value

mixed

in ArrayBodyRepository at line 111
ArrayBodyRepository remove(string|int $key)

Remove an item from the repository.

Parameters

string|int $key

Return Value

ArrayBodyRepository

in ArrayBodyRepository at line 123
bool isEmpty()

Determine if the repository is empty.

Return Value

bool

in ArrayBodyRepository at line 133
bool isNotEmpty()

Determine if the repository is not empty.

Return Value

bool

StreamInterface toStream()

Convert the body repository into a stream.

Return Value

StreamInterface

at line 18
string __toString()

Convert into a string.

Return Value

string