WorkOS PHP SDK

FlagRule
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$environmentId  : string
The ID of the environment the Flag Rule belongs to.
$flagId  : string
The ID of the Feature Flag the rule belongs to.
$flagSlug  : string
The slug of the Feature Flag the rule belongs to.
$id  : string
Unique identifier of the Flag Rule.
$object  : string
$position  : int
The zero-based position of the rule in evaluation order.
$targetType  : string|null
The target type slug, if the rule targets a specific type.
$updatedAt  : DateTimeImmutable
An ISO 8601 timestamp.
$value  : bool
The value the Feature Flag evaluates to when the rule matches.
$valueType  : string

Methods

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

Properties

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$environmentId

The ID of the environment the Flag Rule belongs to.

public string $environmentId

$flagId

The ID of the Feature Flag the rule belongs to.

public string $flagId

$flagSlug

The slug of the Feature Flag the rule belongs to.

public string $flagSlug

$id

Unique identifier of the Flag Rule.

public string $id

$position

The zero-based position of the rule in evaluation order.

public int $position

$targetType

The target type slug, if the rule targets a specific type.

public string|null $targetType

$updatedAt

An ISO 8601 timestamp.

public DateTimeImmutable $updatedAt

$value

The value the Feature Flag evaluates to when the rule matches.

public bool $value

Methods

__construct()

public __construct(string $object, string $id, string $flagId, string $flagSlug, string $environmentId, string|null $targetType, int $position, string $valueType, bool $value, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt) : mixed
Parameters
$object : string
$id : string
$flagId : string
$flagSlug : string
$environmentId : string
$targetType : string|null
$position : int
$valueType : string
$value : bool
$createdAt : DateTimeImmutable
$updatedAt : DateTimeImmutable

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