SortedMiddleware::shuffle()

Collection shuffle(int $seed = null) Shuffle the items in the collection. Parameters int $seed Return Value Collection

SortedMiddleware::slice()

Collection slice(int $offset, int $length = null) Slice the underlying collection array. Parameters int $offset int $length Return Value Collection

SortedMiddleware::reverse()

Collection reverse() Reverse items order. Return Value Collection

SortedMiddleware::reduce()

mixed reduce(callable $callback, mixed $initial = null) Reduce the collection to a single value. Parameters callable $callback mixed $initial Return Value mixed

SortedMiddleware::reject()

Collection reject(callable|mixed $callback) Create a collection of all elements that do not pass a given truth test. Parameters callable|mixed $callback Return Value Collection

SortedMiddleware::search()

mixed search(mixed $value, bool $strict = false) Search the collection for a given value and return the corresponding key if successful. Parameters mixed $value bool $strict Return Value mixed

SortedMiddleware::put()

$this put(mixed $key, mixed $value) Put an item in the collection by key. Parameters mixed $key mixed $value Return Value $this

SortedMiddleware::pull()

mixed pull(mixed $key, mixed $default = null) Get and remove an item from the collection. Parameters mixed $key mixed $default Return Value mixed

SortedMiddleware::push()

$this push(mixed $value) Push an item onto the end of the collection. Parameters mixed $value Return Value $this

SortedMiddleware::random()

mixed random(int $amount = 1) Get one or more items randomly from the collection. Parameters int $amount Return Value mixed Exceptions InvalidArgumentException