The StreamId class is a simple model class that implements the RequestInterface. It represents a stream ID used for streaming data.
To use the StreamId class, you first need to instantiate it with a valid string ID.
use Simpay\Model\Request\StreamId;
// Instantiate a StreamId object with a valid string ID
$streamId = new StreamId('abc123');
// Output the stream ID as an array
print_r($streamId->toArray()); // ["stream_id" => "abc123"]Instantiates a StreamId object with a valid string ID.
Parameters:
$id: string - The string ID.
Returns the stream ID as an array.
Returns:
- array - The stream ID as an array.
use Simpay\Model\Request\StreamId;
// Instantiate a StreamId object with a valid string ID
$streamId = new StreamId('abc123');
// Output the stream ID as an array
print_r($streamId->toArray()); // ["stream_id" => "abc123"]