Skip to content

Arrayable interface, Collection class, new functions for Arr class

Compare
Choose a tag to compare
@pdscopes pdscopes released this 08 Sep 10:19
· 16 commits to master since this release

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.