Collection
in package
implements
IteratorAggregate, Countable, JsonSerializable
Interfaces, Classes and Traits
- IteratorAggregate
- Countable
- JsonSerializable
Table of Contents
- $items : mixed
- __construct() : mixed
- count() : mixed
- fromArray() : mixed
- getIterator() : mixed
- isEmpty() : mixed
- jsonSerialize() : mixed
- length() : mixed
- map() : array<string|int, mixed>
- Apply a callback to each member of the resultset. Returning `null` from the callback will exclude the item from the resultset.
- pop() : mixed
- push() : mixed
- shift() : mixed
- toArray() : mixed
- toCompat() : Collection
- Return this collection as a CEO Compat Collection
- unshift() : mixed
Properties
$items
private
mixed
$items
= []
Methods
__construct()
public
__construct([mixed $items = [] ]) : mixed
Parameters
- $items : mixed = []
Return values
mixed —count()
public
count() : mixed
Return values
mixed —fromArray()
public
fromArray(mixed $items) : mixed
Parameters
- $items : mixed
Return values
mixed —getIterator()
public
getIterator() : mixed
Return values
mixed —isEmpty()
public
isEmpty() : mixed
Return values
mixed —jsonSerialize()
public
jsonSerialize() : mixed
Return values
mixed —length()
public
length() : mixed
Return values
mixed —map()
Apply a callback to each member of the resultset. Returning `null` from the callback will exclude the item from the resultset.
public
map(callable $callback) : array<string|int, mixed>
Parameters
- $callback : callable
Return values
array<string|int, mixed> —pop()
public
pop(mixed $item) : mixed
Parameters
- $item : mixed
Return values
mixed —push()
public
push(mixed $item) : mixed
Parameters
- $item : mixed
Return values
mixed —shift()
public
shift(mixed $item) : mixed
Parameters
- $item : mixed
Return values
mixed —toArray()
public
toArray() : mixed
Return values
mixed —toCompat()
Return this collection as a CEO Compat Collection
public
toCompat() : Collection
Return values
Collection —unshift()
public
unshift(mixed $item) : mixed
Parameters
- $item : mixed