15 public function all();
22 public function count();
40 public function get(
$id);
58 public function remove(
$id);
86 public function filter(?callable $callback = null);
96 public function sort(?callable $callback = null);
111 public function walk(callable $callback);
120 public function map(callable $callback);
filter(?callable $callback=null)
Filter collection items using a custom filter Returns a new collection instance.
fill($items)
Replace collection items.
merge($items)
Add new items to collection, replacing items with matching IDs.
walk(callable $callback)
Walk through members of the collection and apply a callback.
sort(?callable $callback=null)
Sort fields using custom callable If not provided, will sort items by priority.
map(callable $callback)
Walk through all items in the collection and apply a callback.
add($item)
Add a new item to collection.
An interface for organizing items into collections.
all()
Returns all collection items by reference.
count()
Count collection items.
has($id)
Check if collection has an item with a given ID.
$id
Generic annotation delete action.