Arraydotify
class Arraydotify implements ArrayAccess (View source)
Methods
Arraydotify constructor.
Make array dotify (static factory method)
Get a value from the array using dot notation
Check if a key exists in the array using dot notation
Set a value in the array using dot notation
Unset a value from the array using dot notation
Get the original array
Get the dotified array
Check if the array has a key using dot notation
Get a value using dot notation with a default fallback
Set a value using dot notation
Details
__construct(array $items = [])
Arraydotify constructor.
static Arraydotify
make(array $items = [])
Make array dotify (static factory method)
mixed
offsetGet(mixed $offset)
Get a value from the array using dot notation
bool
offsetExists(mixed $offset)
Check if a key exists in the array using dot notation
void
offsetSet(mixed $offset, mixed $value)
Set a value in the array using dot notation
void
offsetUnset(mixed $offset)
Unset a value from the array using dot notation
array
toArray()
Get the original array
array
getDotified()
Get the dotified array
bool
has(string $key)
Check if the array has a key using dot notation
mixed
get(string $key, mixed $default = null)
Get a value using dot notation with a default fallback
void
set(string $key, mixed $value)
Set a value using dot notation