BlockCollection implements ItemCollection, Iterator, Countable
Table of Contents
Interfaces
- ItemCollection
- Iterator
- Countable
Methods
- __construct() : mixed
- add() : BlockCollection
- all() : bool
- clear() : BlockCollection
- count() : int
- current() : Block|null
- filter() : BlockCollection
- filterByParty() : BlockCollection
- filterByRole() : BlockCollection
- filterExcludeParty() : BlockCollection
- filterExcludeRole() : BlockCollection
- getById() : Block|null
- getIds() : array<string|int, int>
- isEmpty() : bool
- key() : int
- next() : void
- rewind() : void
- toArray() : array<string|int, T>
- valid() : bool
Methods
__construct()
public
__construct(Block ...$items) : mixed
Parameters
- $items : Block
add()
public
add(Block $item) : BlockCollection
Parameters
- $item : Block
Return values
BlockCollectionall()
public
all(Closure $rule) : bool
Parameters
- $rule : Closure
Return values
boolclear()
public
clear() : BlockCollection
Return values
BlockCollectioncount()
public
count() : int
Return values
intcurrent()
public
current() : Block|null
Return values
Block|nullfilter()
public
filter(Closure $rule) : BlockCollection
Parameters
- $rule : Closure
Return values
BlockCollectionfilterByParty()
public
filterByParty(int $party) : BlockCollection
Parameters
- $party : int
Return values
BlockCollectionfilterByRole()
public
filterByRole(string $role) : BlockCollection
Parameters
- $role : string
Return values
BlockCollectionfilterExcludeParty()
public
filterExcludeParty(int $party) : BlockCollection
Parameters
- $party : int
Return values
BlockCollectionfilterExcludeRole()
public
filterExcludeRole(string $role) : BlockCollection
Parameters
- $role : string
Return values
BlockCollectiongetById()
public
getById(int $id) : Block|null
Parameters
- $id : int
Return values
Block|nullgetIds()
public
getIds() : array<string|int, int>
Return values
array<string|int, int>isEmpty()
public
isEmpty() : bool
Return values
boolkey()
public
key() : int
Return values
intnext()
public
next() : void
rewind()
public
rewind() : void
toArray()
public
toArray() : array<string|int, T>
Return values
array<string|int, T>valid()
public
valid() : bool