Arrayable interface, Collection class, new functions for Arr class
Added Arrayable
interface
Arrayable
interface defines a simple function that should convert an instance into an array.
Added Collection
class
A Collection
is way to interact with an array as an object. It provides many of the methods available in Arr
.
New function in Arr
Two new functions have been added to Arr
:
1 Arr::filter
: supply a callable
and the array will be filter to only contain values that return true
2 Arr::except
: the opposite of only, leaves all items in the array except those keys provided.