Stellar PHP SDK API Documentation

LiquidityPoolsResponse extends IteratorIterator

Iterable collection of liquidity pool responses

This class provides an iterable wrapper around a collection of LiquidityPoolResponse objects. It extends IteratorIterator to enable efficient traversal of liquidity pools returned from Horizon API endpoints. The collection supports iteration, counting, array conversion, and dynamic addition of pool records.

Used by LiquidityPoolsPageResponse to hold the pools contained in a single page of results. Each item in the collection represents an individual liquidity pool with its reserves, shares, and metadata.

Tags
see
LiquidityPoolResponse

For individual pool details

see
LiquidityPoolsPageResponse

For paginated pool results

Table of Contents

Methods

__construct()  : mixed
Constructs a new liquidity pools collection
add()  : void
Adds a liquidity pool response to the collection
count()  : int
Gets the total number of liquidity pools in this collection
current()  : LiquidityPoolResponse
Gets the current liquidity pool in the iteration
toArray()  : array<string|int, LiquidityPoolResponse>

Methods

count()

Gets the total number of liquidity pools in this collection

public count() : int
Return values
int

The count of pools


        
On this page

Search results