class StreamEnd extends StreamEvent

Properties

string|null $invocationId from  StreamEvent

Methods

array
toArray()

Get the event as an array.

void
broadcast(Channel|array $channels, bool $now = true)

Broadcast the stream event immediately or using the queue.

void
broadcastNow(Channel|array $channels)

Broadcast the stream event immediately.

string
type()

Get the event's type.

withInvocationId(string $id)

Set the invocation ID associated with the event.

string
__toString()

Get the string representation of the event.

__construct(string $id, string $reason, TextUsage $usage, int $timestamp, Collection $steps = new Collection())

Create a stream end event.

static TextUsage
combineUsage(Collection|array $events)

Combine the stream end usages in the given collection of events into a single usage instance.

Details

at line 45
array toArray()

Get the event as an array.

Return Value

array

in StreamEvent at line 26
void broadcast(Channel|array $channels, bool $now = true)

Broadcast the stream event immediately or using the queue.

Parameters

Channel|array $channels
bool $now

Return Value

void

in StreamEvent at line 41
void broadcastNow(Channel|array $channels)

Broadcast the stream event immediately.

Parameters

Channel|array $channels

Return Value

void

in StreamEvent at line 49
string type()

Get the event's type.

Return Value

string

in StreamEvent at line 57
StreamEvent withInvocationId(string $id)

Set the invocation ID associated with the event.

Parameters

string $id

Return Value

StreamEvent

in StreamEvent at line 67
string __toString()

Get the string representation of the event.

Return Value

string

at line 18
__construct(string $id, string $reason, TextUsage $usage, int $timestamp, Collection $steps = new Collection())

Create a stream end event.

Parameters

string $id
string $reason
TextUsage $usage
int $timestamp
Collection $steps

replay state for the completed turn; never serialized to clients

at line 30
static TextUsage combineUsage(Collection|array $events)

Combine the stream end usages in the given collection of events into a single usage instance.

Parameters

Collection|array $events

Return Value

TextUsage