EffectsResponse
extends IteratorIterator
in package
Iterable collection of effect responses
This class provides an iterator-based collection for managing multiple EffectResponse objects. Supports standard iteration operations and array conversion. Used within EffectsPageResponse for effect collections.
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructs a new effects collection
- add() : void
- Adds an effect to the collection
- count() : int
- Gets the number of effects in the collection
- current() : EffectResponse
- Gets the current effect in the iteration
- toArray() : array<string|int, EffectResponse>
- Converts the collection to an array
Methods
__construct()
Constructs a new effects collection
public
__construct(EffectResponse ...$responses) : mixed
Parameters
- $responses : EffectResponse
-
Variable number of effect responses
add()
Adds an effect to the collection
public
add(EffectResponse $response) : void
Parameters
- $response : EffectResponse
-
The effect to add
count()
Gets the number of effects in the collection
public
count() : int
Return values
int —The effect count
current()
Gets the current effect in the iteration
public
current() : EffectResponse
Return values
EffectResponse —The current effect
toArray()
Converts the collection to an array
public
toArray() : array<string|int, EffectResponse>
Return values
array<string|int, EffectResponse> —Array of effects