LaunchDarkly PHP SDK 4.2.3

EvaluationDetail
in package

An object that combines the result of a flag evaluation with an explanation of how it was calculated.

This is returned by LDClient::variationDetail().

Table of Contents

__construct()  : mixed
EvaluationDetail constructor.
getReason()  : EvaluationReason
Returns information about how the flag value was calculated.
getValue()  : mixed
Returns the value of the flag variation for the user.
getVariationIndex()  : int
Returns the index of the flag variation for the user, e.g. 0 for the first variation - or null if it was the default value.
isDefaultValue()  : bool
Returns true if the flag evaluated to the default value, rather than one of its variations.

Methods

__construct()

EvaluationDetail constructor.

public __construct(mixed|null $value, int|null $variationIndex, EvaluationReason $reason) : mixed
Parameters
$value : mixed|null

the value of the flag variation

$variationIndex : int|null

the index of the flag variation, or null if it was the default value

$reason : EvaluationReason

evaluation reason properties

Return values
mixed

getValue()

Returns the value of the flag variation for the user.

public getValue() : mixed
Return values
mixed

getVariationIndex()

Returns the index of the flag variation for the user, e.g. 0 for the first variation - or null if it was the default value.

public getVariationIndex() : int
Return values
int

| null

isDefaultValue()

Returns true if the flag evaluated to the default value, rather than one of its variations.

public isDefaultValue() : bool
Return values
bool

Search results