API Events HttpResponseReceivedEvent - evansims/openfga-php GitHub Wiki
Event fired when an HTTP response is received from the OpenFGA API. This event contains both the request and response for complete telemetry tracking.
Table of Contents
OpenFGA\Events
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 request failed.
Throwable | null — The exception or null if the request 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 getRequest(): RequestInterfaceGet the HTTP request that was sent.
RequestInterface — The PSR-7 request object
public function getResponse(): ResponseInterface|nullGet the HTTP response received.
ResponseInterface | null — The PSR-7 response object or null if an exception occurred
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 HTTP request was successful.
bool — True if no exception occurred, false otherwise
public function stopPropagation(): voidStop event propagation to remaining listeners.
void