SortedMiddleware::every()

Collection every(int $step, int $offset) Create a new collection consisting of every n-th element. Parameters int $step int $offset Return Value Collection

SortedMiddleware::count()

int count() Count the number of items in the collection. Return Value int

SortedMiddleware::diff()

Collection diff(mixed $items) Get the items in the collection that are not present in the given items. Parameters mixed $items Return Value Collection

SortedMiddleware::containsStrict()

bool containsStrict(mixed $key, mixed $value = null) Determine if an item exists in the collection using strict comparison. Parameters mixed $key mixed $value Return Value bool

SortedMiddleware::diffKeys()

Collection diffKeys(mixed $items) Get the items in the collection whose keys are not present in the given items. Parameters mixed $items Return Value Collection

SortedMiddleware::combine()

Collection combine(mixed $values) Create a collection by using this collection for keys and another for its values. Parameters mixed $values Return Value Collection

SortedMiddleware::contains()

bool contains(mixed $key, mixed $value = null) Determine if an item exists in the collection. Parameters mixed $key mixed $value Return Value bool

SortedMiddleware::collapse()

Collection collapse() Collapse the collection of items into a single array. Return Value Collection

SortedMiddleware::avg()

mixed avg(callable|string|null $callback = null) Get the average value of a given key. Parameters callable|string|null $callback Return Value mixed

SortedMiddleware::chunk()

Collection chunk(int $size) Chunk the underlying collection array. Parameters int $size Return Value Collection