Explore Server Side Testing SDK for PHP

DecisionManager

Table of Contents

Properties

$logger  : LoggerInterface
$storage  : StorageFacadeInterface
$trafficAllocationManager  : TrafficAllocationManager
$userProvider  : UserProviderInterface
$voterRegistry  : VoterRegistry

Methods

__construct()  : mixed
decide()  : array<string|int, Decision>
Decide which experiments and variations to show to the user
getExperimentsSortedByPriority()  : array<string|int, mixed>
Get experiments sorted by priority in ascending order
calculateVariation()  : array<string|int, mixed>|null
Calculate which variation to show based on traffic allocation and buckets

Properties

Methods

decide()

Decide which experiments and variations to show to the user

public decide(Context $context[, string $experimentKey = "" ]) : array<string|int, Decision>
Parameters
$context : Context
$experimentKey : string = ""
Return values
array<string|int, Decision>

getExperimentsSortedByPriority()

Get experiments sorted by priority in ascending order

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

calculateVariation()

Calculate which variation to show based on traffic allocation and buckets

private calculateVariation(Experiment $experiment, User $user) : array<string|int, mixed>|null
Parameters
$experiment : Experiment
$user : User
Return values
array<string|int, mixed>|null

The selected variation or null if no variation should be shown


        
On this page

Search results