PHP 클래스 Vimeo\ABLincoln\Namespaces\AbstractNamespace

파일 보기 프로젝트 열기: vimeo/ablincoln

공개 메소드들

메소드 설명
__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