Skip to content

Latest commit

 

History

History
448 lines (257 loc) · 5.67 KB

Group.md

File metadata and controls

448 lines (257 loc) · 5.67 KB

Group

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

Group::getValues

Description

public getValues (void)

Get all values for the group

Parameters

This function has no parameters.

Return Values

object


Group::getValue

Description

public getValue (int|string $property)

Get property value of group

Parameters

  • (int|string) $property

Return Values

mixed


Group::setValue

Description

public setValue (string $property, mixed $value)

Set property value of group

Parameters

  • (string) $property
  • (mixed) $value

Return Values

self


Group::getName

Description

public getName (void)

Get group name

Parameters

This function has no parameters.

Return Values

null|string


Group::setName

Description

public setName (string $name)

Set group name

Parameters

  • (string) $name

Return Values

self


Group::getViews

Description

public getViews (void)

Get group views

Parameters

This function has no parameters.

Return Values

int


Group::setViews

Description

public setViews (int|string $views)

Set group views

Parameters

  • (int|string) $views

Return Values

self


Group::getConversions

Description

public getConversions (void)

Get number of conversions for the group

Parameters

This function has no parameters.

Return Values

int


Group::setConversions

Description

public setConversions (int|string $conversions)

Set number of conversions for the group

Parameters

  • (int|string) $conversions

Return Values

self


Group::getConversionRate

Description

public getConversionRate (void)

Get conversion rate for the group

Parameters

This function has no parameters.

Return Values

float


Group::isWinner

Description

public isWinner (void)

Get whether the group is the winner

Parameters

This function has no parameters.

Return Values

bool


Group::setWinner

Description

public setWinner (void)

Define the group as the winner

Parameters

This function has no parameters.

Return Values

self


Group::isLoser

Description

public isLoser (void)

Get whether the group is the loser

Parameters

This function has no parameters.

Return Values

bool


Group::setLoser

Description

public setLoser (void)

Define the group as the loser

Parameters

This function has no parameters.

Return Values

self


Group::getType

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


Group::isType

Description

public isType (int|string $type)

Get whether the variation is a specific type (0 or 1)

Parameters

  • (int|string) $type

Return Values

bool


Group::setType

Description

public setType (int|string $type)

Set group type (0 or 1)

Parameters

  • (int|string) $type

Return Values

self


Group::isControl

Description

public isControl (void)

Get whether the group is the control

Parameters

This function has no parameters.

Return Values

bool


Group::setControl

Description

public setControl (void)

Define the group as the control

Parameters

This function has no parameters.

Return Values

self


Group::isVariation

Description

public isVariation (void)

Get whether the group is the variation

Parameters

This function has no parameters.

Return Values

bool


Group::setVariation

Description

public setVariation (void)

Define the group as the variation

Parameters

This function has no parameters.

Return Values

self