LedgersResponse
extends IteratorIterator
in package
Iterable collection of ledger responses
Provides iterator functionality for traversing multiple LedgerResponse objects. Supports adding ledgers, counting, and converting to array.
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructs a ledgers collection
- add() : void
- Adds a ledger to the collection
- count() : int
- Gets the total number of ledgers in the collection
- current() : LedgerResponse
- Gets the current ledger in the iteration
- toArray() : array<string|int, LedgerResponse>
- Converts the collection to an array
Methods
__construct()
Constructs a ledgers collection
public
__construct(LedgerResponse ...$ledgers) : mixed
Parameters
- $ledgers : LedgerResponse
-
Variable number of ledger responses
add()
Adds a ledger to the collection
public
add(LedgerResponse $ledger) : void
Parameters
- $ledger : LedgerResponse
-
The ledger to add
count()
Gets the total number of ledgers in the collection
public
count() : int
Return values
int —The count of ledgers
current()
Gets the current ledger in the iteration
public
current() : LedgerResponse
Return values
LedgerResponse —The current ledger
toArray()
Converts the collection to an array
public
toArray() : array<string|int, LedgerResponse>
Return values
array<string|int, LedgerResponse> —Array of ledger responses