collection(iterable<TKey, TValue> $items): Cake\Collection\Collection<TKey, TValue>
Returns a new {@link \Cake\Collection\Collection} object wrapping the passed argument.
TKey
TValue
iterable<TKey, TValue>
$items
The items from which the collection will be built.
Cake\Collection\Collection<TKey, TValue>Describes the methods a Collection should implement. A collection is an immutable list of elements exposing a number of traversing and extracting method for generating other collections.
A collection is an immutable list of elements with a handful of functions to iterate, group, transform and extract information from it.