ResourceCollection implements Item, ItemCollection, Iterator, Countable
Table of Contents
Interfaces
- Item
- ItemCollection
- Iterator
- Countable
Methods
- __construct() : mixed
- add() : ResourceCollection
- clear() : ResourceCollection
- count() : int
- current() : Resource|null
- filter() : ResourceCollection
- findFirst() : resource|null
- findFirstByParty() : Resource|null
- getFirst() : Resource|null
- getIds() : array<string|int, int|null>
- isEmpty() : bool
- key() : int
- next() : void
- rewind() : void
- sort() : static
- toArray() : array<string|int, T>
- valid() : bool
Methods
__construct()
public
__construct(Resource ...$items) : mixed
Parameters
- $items : Resource
add()
public
add(Resource $item) : ResourceCollection
Parameters
- $item : Resource
Return values
ResourceCollectionclear()
public
clear() : ResourceCollection
Return values
ResourceCollectioncount()
public
count() : int
Return values
intcurrent()
public
current() : Resource|null
Return values
Resource|nullfilter()
public
filter(callable(resource): bool $rule) : ResourceCollection
Parameters
- $rule : callable(resource): bool
Return values
ResourceCollectionfindFirst()
public
final findFirst(callable(resource): bool $rule) : resource|null
Parameters
- $rule : callable(resource): bool
Return values
resource|nullfindFirstByParty()
public
final findFirstByParty(int $party) : Resource|null
Parameters
- $party : int
Return values
Resource|nullgetFirst()
public
getFirst() : Resource|null
Return values
Resource|nullgetIds()
public
final getIds() : array<string|int, int|null>
Return values
array<string|int, int|null>isEmpty()
public
isEmpty() : bool
Return values
boolkey()
public
key() : int
Return values
intnext()
public
next() : void
rewind()
public
rewind() : void
sort()
public
final sort(Closure $rule) : static
Parameters
- $rule : Closure
Return values
statictoArray()
public
toArray() : array<string|int, T>
Return values
array<string|int, T>valid()
public
valid() : bool