WorkOS PHP SDK

EventSchema
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

An event emitted by WorkOS.

Table of Contents

Interfaces

JsonSerializable

Properties

$context  : array<string, mixed>|null
Additional context about the event.
$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$data  : array<string, mixed>
The event payload.
$event  : string
The type of event that occurred.
$id  : string
Unique identifier for the Event.
$object  : string
Distinguishes the Event object.

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string|int, mixed>
toArray()  : array<string|int, mixed>

Properties

$context

Additional context about the event.

public array<string, mixed>|null $context = null

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$data

The event payload.

public array<string, mixed> $data

$event

The type of event that occurred.

public string $event

$id

Unique identifier for the Event.

public string $id

$object

Distinguishes the Event object.

public string $object

Methods

__construct()

public __construct(string $object, string $id, string $event, array<string|int, mixed> $data, DateTimeImmutable $createdAt[, array<string|int, mixed>|null $context = null ]) : mixed
Parameters
$object : string
$id : string
$event : string
$data : array<string|int, mixed>
$createdAt : DateTimeImmutable
$context : array<string|int, mixed>|null = null

fromArray()

public static fromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results