Stellar PHP SDK API Documentation

PathAssetsResponse extends IteratorIterator

Iterable collection of assets in a payment path

This class provides an iterable wrapper around a collection of Asset objects representing the sequence of intermediate assets used in a path payment. Path payments allow sending one asset while the recipient receives a different asset, with the network automatically finding the best conversion route through multiple asset pairs.

The collection holds the ordered sequence of assets that form the conversion path, excluding the source and destination assets. For example, in a path from USD to EUR through XLM, this collection would contain [XLM] as the intermediate asset.

Tags
see
Asset

For individual asset details

see
PathResponse

For the complete payment path information

Table of Contents

Methods

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

Methods

__construct()

Constructs a new path assets collection

public __construct(Asset ...$responses) : mixed
Parameters
$responses : Asset

Variable number of asset objects

count()

Gets the total number of assets in this path

public count() : int
Return values
int

The count of intermediate assets


        
On this page

Search results