PHP Класс Vimeo\ABLincoln\Namespaces\AbstractNamespace

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( mixed $inputs ) Set up attributes needed for experiment
addExperiment ( string $name, string $exp_class, integer $num_segments ) Map a new experiment to a given number of segments in the namespace
get ( string $name, string $default ) : the Get the value of a given experiment parameter - triggers exposure log
inExperiment ( ) : boolean In-experiment accessor
logEvent ( string $eventType, array $extras = null ) Log an arbitrary event
logExposure ( array $extras = null ) Logs exposure to treatment
removeExperiment ( string $name ) Remove a given experiment from the namespace and free its associated segments
setAutoExposureLogging ( boolean $value ) Disables / enables auto exposure logging (enabled by default)

Описание методов

__construct() публичный Метод

Set up attributes needed for experiment
public __construct ( mixed $inputs )
$inputs mixed input value or array to determine parameter assignments, e.g. userid

addExperiment() абстрактный публичный Метод

Map a new experiment to a given number of segments in the namespace
abstract public addExperiment ( string $name, string $exp_class, integer $num_segments )
$name string name to give the new experiment
$exp_class string string version of experiment class to instantiate
$num_segments integer number of segments to allocate to experiment

get() абстрактный публичный Метод

Get the value of a given experiment parameter - triggers exposure log
abstract public get ( string $name, string $default ) : the
$name string parameter to get the value of
$default string optional value to return if parameter undefined
Результат the value of the given parameter

inExperiment() абстрактный публичный Метод

In-experiment accessor
abstract public inExperiment ( ) : boolean
Результат boolean true if primary unit mapped to an experiment, false otherwise

logEvent() абстрактный публичный Метод

Log an arbitrary event
abstract public logEvent ( string $eventType, array $extras = null )
$eventType string name of event to kig]
$extras array optional extra data to include in log

logExposure() абстрактный публичный Метод

Logs exposure to treatment
abstract public logExposure ( array $extras = null )
$extras array optional extra data to include in exposure log

removeExperiment() абстрактный публичный Метод

Remove a given experiment from the namespace and free its associated segments
abstract public removeExperiment ( string $name )
$name string previously defined name of experiment to remove

setAutoExposureLogging() абстрактный публичный Метод

Disables / enables auto exposure logging (enabled by default)
abstract public setAutoExposureLogging ( boolean $value )
$value boolean true to enable, false to disable