Helper
Table of Contents
Methods
- clearCache() : void
- Cleans active A/B-test cache
- deleteTest() : bool
- Deletes an A/B-test
- getActiveTest() : array<string|int, mixed>|null
- Returns active A/B-test
- getAlternative() : string|null
- Returns alternative test value for current A/B-test context
- getContext() : array<string|int, mixed>|null
- Returns current A/B-test context
- startTest() : bool
- Starts an A/B-test
- stopTest() : bool
- Stops an A/B-test
Methods
clearCache()
Cleans active A/B-test cache
public
static clearCache(int $siteId) : void
Parameters
- $siteId : int
-
Site ID.
deleteTest()
Deletes an A/B-test
public
static deleteTest(int $id) : bool
Parameters
- $id : int
-
A/B-test ID.
Return values
boolgetActiveTest()
Returns active A/B-test
public
static getActiveTest() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetAlternative()
Returns alternative test value for current A/B-test context
public
static getAlternative(string $type, string $value) : string|null
Parameters
- $type : string
-
Test type.
- $value : string
-
Test original value.
Return values
string|nullgetContext()
Returns current A/B-test context
public
static getContext() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullstartTest()
Starts an A/B-test
public
static startTest(int $id) : bool
Parameters
- $id : int
-
A/B-test ID.
Return values
boolstopTest()
Stops an A/B-test
public
static stopTest(int $id[, bool $auto = false ]) : bool
Parameters
- $id : int
-
A/B-test ID.
- $auto : bool = false
-
Auto-stop flag.