PHPAPI reference
Feature flags
Feature flags in the PHP SDK.
// access
$nexus->flags()Flags
classclass Inverge\Nexus\Resource\FlagsFeature flags — evaluate a project's active flags for a specific person.
Response shape: { flags: {key: bool|variantString}, payloads: {key: mixed} }.
__construct
constructorfunction __construct(Inverge\Nexus\NexusClient $client)Parameters
Prop
Type
evaluate()
methodfunction evaluate(string $distinctId, array $properties = []): arrayEvaluate every active flag for $distinctId.
Parameters
Prop
Type
Returns array{flags:array<string,bool|string>,payloads:array<string,mixed>}
isEnabled()
methodfunction isEnabled(string $key, string $distinctId, array $properties = []): boolWhether a flag is on for the person. Boolean flags → their value; multivariate flags → true when a variant resolved.
Parameters
Prop
Type
Returns bool
variant()
methodfunction variant(string $key, string $distinctId, array $properties = []): ?stringThe resolved variant key for a multivariate flag (null for boolean/off).
Parameters
Prop
Type
Returns ?string
payload()
methodfunction payload(string $key, string $distinctId, array $properties = []): mixedThe flag's JSON payload for the person (null when disabled/absent).
Parameters
Prop
Type
Returns mixed
