BaseCollection implements ItemCollection
AbstractYes
Tags
Table of Contents
Interfaces
Methods
- __call() : Item|null
- __construct() : mixed
- add() : static
- count() : int
- empty() : bool
- filter() : static
- getFirst() : V|null
- getItemById() : V
- getItemMap() : array<string|int, V>
- getIterator() : ArrayIterator<int|string, V>
- getKeys() : array<string|int, V>
- getValues() : array<string|int, V>
- map() : array<string|int, mixed>
- remove() : $this
- setTotalCount() : static
- totalCount() : int
Methods
__call()
public
__call(string $name, array<string|int, mixed> $arguments) : Item|null
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Return values
Item|null__construct()
public
__construct(Item ...$items) : mixed
Parameters
- $items : Item
Tags
add()
public
add(Item $item) : static
Parameters
- $item : Item
Tags
Return values
staticcount()
public
count() : int
Return values
intempty()
public
empty() : bool
Return values
boolfilter()
public
filter(callable(V): bool $rule) : static
Parameters
- $rule : callable(V): bool
Tags
Return values
staticgetFirst()
public
getFirst() : V|null
Return values
V|nullgetItemById()
public
getItemById(int $id) : V
Parameters
- $id : int
Return values
VgetItemMap()
public
getItemMap() : array<string|int, V>
Return values
array<string|int, V>getIterator()
public
getIterator() : ArrayIterator<int|string, V>
Return values
ArrayIterator<int|string, V>getKeys()
public
getKeys() : array<string|int, V>
Return values
array<string|int, V>getValues()
public
getValues() : array<string|int, V>
Return values
array<string|int, V>map()
public
map(callable $closure) : array<string|int, mixed>
Parameters
- $closure : callable
Return values
array<string|int, mixed>remove()
public
remove(Item $item) : $this
Parameters
- $item : Item
Return values
$thissetTotalCount()
public
setTotalCount(int $count) : static
Parameters
- $count : int
Return values
statictotalCount()
public
totalCount() : int