This class is in charge of creating and handling the control and variation groups of an experiment, including getting and setting their values such as group type, numbers of views and conversions, and whether the group is the winning or losing variant.
Name | Description |
---|---|
getValues | Get all values for the group |
getValue | Get property value of group |
setValue | Set property value of group |
getName | Get group name |
setName | Set group name |
getViews | Get group views |
setViews | Set group views |
getConversions | Get number of conversions for the group |
setConversions | Set number of conversions for the group |
getConversionRate | Get conversion rate for the group |
isWinner | Get whether the group is the winner |
setWinner | Define the group as the winner |
isLoser | Get whether the group is the loser |
setLoser | Define the group as the loser |
getType | Get group type |
isType | Get whether the variation is a specific type |
setType | Set group type |
isControl | Get whether the group is the control |
setControl | Define the group as the control |
isVariation | Get whether the group is the variation |
setVariation | Define the group as the variation |
Description
public getValues (void)
Get all values for the group
Parameters
This function has no parameters.
Return Values
object
Description
public getValue (int|string $property)
Get property value of group
Parameters
(int|string) $property
Return Values
mixed
Description
public setValue (string $property, mixed $value)
Set property value of group
Parameters
(string) $property
(mixed) $value
Return Values
self
Description
public getName (void)
Get group name
Parameters
This function has no parameters.
Return Values
null|string
Description
public setName (string $name)
Set group name
Parameters
(string) $name
Return Values
self
Description
public getViews (void)
Get group views
Parameters
This function has no parameters.
Return Values
int
Description
public setViews (int|string $views)
Set group views
Parameters
(int|string) $views
Return Values
self
Description
public getConversions (void)
Get number of conversions for the group
Parameters
This function has no parameters.
Return Values
int
Description
public setConversions (int|string $conversions)
Set number of conversions for the group
Parameters
(int|string) $conversions
Return Values
self
Description
public getConversionRate (void)
Get conversion rate for the group
Parameters
This function has no parameters.
Return Values
float
Description
public isWinner (void)
Get whether the group is the winner
Parameters
This function has no parameters.
Return Values
bool
Description
public setWinner (void)
Define the group as the winner
Parameters
This function has no parameters.
Return Values
self
Description
public isLoser (void)
Get whether the group is the loser
Parameters
This function has no parameters.
Return Values
bool
Description
public setLoser (void)
Define the group as the loser
Parameters
This function has no parameters.
Return Values
self
Description
public getType (void)
Get group type
Returns 0 for control, 1 for variation and null when type is unknown
Parameters
This function has no parameters.
Return Values
int|null
Description
public isType (int|string $type)
Get whether the variation is a specific type (0 or 1)
Parameters
(int|string) $type
Return Values
bool
Description
public setType (int|string $type)
Set group type (0 or 1)
Parameters
(int|string) $type
Return Values
self
Description
public isControl (void)
Get whether the group is the control
Parameters
This function has no parameters.
Return Values
bool
Description
public setControl (void)
Define the group as the control
Parameters
This function has no parameters.
Return Values
self
Description
public isVariation (void)
Get whether the group is the variation
Parameters
This function has no parameters.
Return Values
bool
Description
public setVariation (void)
Define the group as the variation
Parameters
This function has no parameters.
Return Values
self