This class is in charge of managing your experiment, including configuring the name, identifier, optionally limiting the percentual amount of visitors to include, defining and handling their control and variant groups, and returning your results.
Name | Description |
---|---|
getID | Get experiment ID |
setID | Set experiment ID |
getName | Get experiment name |
setName | Set experiment name |
getGroups | Get both groups |
getGroup | Get a specific group |
setGroup | Define a group |
getControl | Get the control |
setControl | Define the control |
getVariation | Get the variation |
setVariation | Define the variation |
getAllocation | Get experiment allocation |
setAllocation | Set experiment allocation |
getResult | Return a Result instance from the current experiment |
Description
public getID (void)
Get experiment ID
Parameters
This function has no parameters.
Return Values
mixed|null
Description
public setID (mixed $id)
Set experiment ID
Parameters
(mixed) $id
Return Values
self
Description
public getName (void)
Get experiment name
Parameters
This function has no parameters.
Return Values
string|null
Description
public setName (string $name)
Set experiment name
Parameters
(string) $name
Return Values
self
Description
public getGroups (void)
Get both groups
Parameters
This function has no parameters.
Return Values
array
Description
public getGroup (int|string $key)
Get a specific group
Parameters
(int|string) $key
Return Values
Group
Description
public setGroup (int|string $key, Group|array|object $group)
Define a group
Parameters
(int|string) $key
(Group|array|object) $group
Return Values
self
Description
public getControl (void)
Get the control
Parameters
This function has no parameters.
Return Values
Group
Description
public setControl (Group|array|object $group)
Define the control
Parameters
(Group|array|object) $group
Return Values
self
Description
public getVariation (void)
Get the variation
Parameters
This function has no parameters.
Return Values
Group
Description
public setVariation (Group|array|object $group)
Define the variation
Parameters
(Group|array|object) $group
Return Values
self
Description
public getAllocation (void)
Get experiment allocation
This is the percentual chance that a new user will be included in the experiment
Parameters
This function has no parameters.
Return Values
int
Description
public setAllocation (int|string $percent)
Set experiment allocation
This is the percentual chance that a new user will be included in the experiment
Parameters
(int|string) $percent
Return Values
self
Description
public getResult (void)
Return a Result instance from the current experiment
Parameters
This function has no parameters.
Return Values
Result