API Events OperationCompletedEvent - evansims/openfga-php GitHub Wiki
Event fired when a high-level operation completes. This event tracks the completion of business operations with success/failure information.
Table of Contents
OpenFGA\Events
public function getContext(): array<string, mixed>array<string, mixed>
public function getEventId(): stringGet the unique identifier for this event.
string — A unique identifier for the event instance
public function getEventType(): stringGet the name/type of this event.
string — The event type identifier
public function getException(): Throwable|nullGet the exception if the operation failed.
Throwable | null — The exception or null if the operation succeeded
public function getModelId(): string|nullGet the model ID for the operation.
string | null — The model ID or null if not applicable
public function getOccurredAt(): DateTimeImmutableGet when this event occurred.
DateTimeImmutable — The timestamp when the event was created
public function getOperation(): stringGet the OpenFGA operation name.
string — The operation name (for example, 'check', 'write', 'read')
public function getPayload(): arrayGet the event payload data.
array — The event data
public function getResult(): mixedGet the result of the operation.
mixed — The operation result (typically a Response object) or null if failed
public function getStoreId(): string|nullGet the store ID for the operation.
string | null — The store ID or null if not applicable
public function isPropagationStopped(): boolCheck if event propagation should be stopped.
bool — True if propagation should be stopped
public function isSuccessful(): boolCheck if the operation completed successfully.
bool — True if the operation succeeded, false otherwise
public function stopPropagation(): voidStop event propagation to remaining listeners.
void