Set
class Set extends Mutator (View source)
Set a value in an array or object by key using dot notation.
If the key is an array, it will be treated as a path to the value.
Ported and adapted from illuminate/collections
helper data_set
.
Methods
__construct(array|int|string $key, mixed $value, bool $overwrite = true)
No description
mixed
mutate(mixed $value)
Mutate the input value.
Details
__construct(array|int|string $key, mixed $value, bool $overwrite = true)
No description
static Set
make(array|int|string $key, mixed $value, bool $overwrite = true)
No description
mixed
mutate(mixed $value)
Mutate the input value.