API Events EventInterface - evansims/openfga-php GitHub Wiki

Base interface for all domain events. Events represent something significant that happened in the domain. They are immutable value objects that capture the facts about what occurred.

Table of Contents


Namespace

OpenFGA\Events


Source

View source code


Methods

getEventId

public function getEventId(): string

Get the unique identifier for this event.

View source


Returns

string — A unique identifier for the event instance


getEventType

public function getEventType(): string

Get the name/type of this event.

View source


Returns

string — The event type identifier


getOccurredAt

public function getOccurredAt(): DateTimeImmutable

Get when this event occurred.

View source


Returns

DateTimeImmutable — The timestamp when the event was created


getPayload

public function getPayload(): array<string, mixed>

Get the event payload data.

View source


Returns

array&lt;string, mixed&gt; — The event data


isPropagationStopped

public function isPropagationStopped(): bool

Check if event propagation should be stopped.

View source


Returns

bool — True if propagation should be stopped


stopPropagation

public function stopPropagation(): void

Stop event propagation to remaining listeners.

View source


Returns

void

⚠️ **GitHub.com Fallback** ⚠️