Stellar PHP SDK API Documentation

ManageDataOperationBuilder
in package

Builder for creating ManageData operations.

This builder implements the builder pattern to construct ManageDataOperation instances with a fluent interface. ManageData operations set, modify, or delete key-value pairs stored in an account's data entries.

Tags
see
ManageDataOperation
see
https://developers.stellar.org

Stellar developer docs

since
1.0.0
example

$operation = (new ManageDataOperationBuilder('mykey', 'myvalue')) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new ManageData operation builder.
build()  : ManageDataOperation
Builds the ManageData operation.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

__construct()

Creates a new ManageData operation builder.

public __construct(string $key[, string|null $value = null ]) : mixed

Pass null as the value parameter to delete a data entry.

Parameters
$key : string

The name of the data entry

$value : string|null = null

The value of the data entry (null will delete the entry)

setMuxedSourceAccount()

Sets the muxed source account for this operation.

public setMuxedSourceAccount(MuxedAccount $sourceAccount) : $this
Parameters
$sourceAccount : MuxedAccount

The muxed account to use as source

Return values
$this

Returns the builder instance for method chaining

setSourceAccount()

Sets the source account for this operation.

public setSourceAccount(string $accountId) : $this
Parameters
$accountId : string

The Stellar account ID (G...)

Return values
$this

Returns the builder instance for method chaining


        
On this page

Search results