Arr
class Arr
Array helper.
Methods
Sets an array value using "dot notation".
Search for an array value using "dot notation". Returns TRUE if the array key exists and FALSE if not.
Returns value from array using "dot notation".
Deletes an array value using "dot notation".
Returns a random value from an array.
Returns TRUE if the array is associative and FALSE if not.
Returns the values from a single column of the input array, identified by the key.
Expands a wildcard key to an array of "dot notation" keys.
Details
at line 39
static
set(array $array, string $path, mixed $value)
Sets an array value using "dot notation".
at line 65
static bool
has(array $array, string $path)
Search for an array value using "dot notation". Returns TRUE if the array key exists and FALSE if not.
at line 90
static mixed
get(array $array, string $path, mixed $default = null)
Returns value from array using "dot notation".
at line 114
static bool
delete(array $array, string $path)
Deletes an array value using "dot notation".
at line 141
static mixed
random(array $array)
Returns a random value from an array.
at line 152
static bool
isAssoc(array $array)
Returns TRUE if the array is associative and FALSE if not.
at line 164
static array
pluck(array $array, string $key)
Returns the values from a single column of the input array, identified by the key.
at line 183
static array
expandKey(array $array, string $key)
Expands a wildcard key to an array of "dot notation" keys.