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 37
static
set(array $array, string $path, mixed $value)
Sets an array value using "dot notation".
at line 63
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 88
static mixed
get(array $array, string $path, mixed $default = null)
Returns value from array using "dot notation".
at line 112
static bool
delete(array $array, string $path)
Deletes an array value using "dot notation".
at line 139
static mixed
random(array $array)
Returns a random value from an array.
at line 150
static bool
isAssoc(array $array)
Returns TRUE if the array is associative and FALSE if not.
at line 162
static array
pluck(array $array, string $key)
Returns the values from a single column of the input array, identified by the key.
at line 181
static array
expandKey(array $array, string $key)
Expands a wildcard key to an array of "dot notation" keys.