Stellar PHP SDK API Documentation

OffersResponse extends IteratorIterator

Iterable collection of offer responses

This class provides an iterable wrapper around a collection of OfferResponse objects representing DEX offers. It extends IteratorIterator to enable efficient traversal of offers returned from Horizon API endpoints. The collection supports iteration, counting, array conversion, and dynamic addition of offer records.

Used by OffersPageResponse to hold the offers contained in a single page of results. Each item in the collection represents an individual standing order on the Stellar distributed exchange with its price, amounts, and asset details.

Tags
see
OfferResponse

For individual offer details

see
OffersPageResponse

For paginated offer results

Table of Contents

Methods

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

Methods

count()

Gets the total number of offers in this collection

public count() : int
Return values
int

The count of offers


        
On this page

Search results