PHP 클래스 Vimeo\ABLincoln\Assignment

파일 보기 프로젝트 열기: vimeo/ablincoln 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $experiment_salt, $overrides = [] ) Store the given experiment salt for future use
__get ( string $name ) : mixed Get the value of a key in the Assignment object if it exists
__isset ( string $name ) : boolean Check if a given key is set in the Assignment object
__set ( string $name, mixed $value ) Set the value of a key in the object using the parameter name as salt
__unset ( string $name ) Unset the value at a given key
asArray ( ) : array Get the array representation of this Assignment
evaluate ( mixed $value ) Evaluate a given parameter and return its value. Currently just directly returns the given argument but can be modified with more complex behavior
getOverrides ( ) : array Get an array of all Assignment parameter overrides
setOverrides ( array $overrides ) Set overrides for the Assignment parameters

메소드 상세

__construct() 공개 메소드

Store the given experiment salt for future use
public __construct ( string $experiment_salt, $overrides = [] )
$experiment_salt string the experiment salt to store

__get() 공개 메소드

Get the value of a key in the Assignment object if it exists
public __get ( string $name ) : mixed
$name string key to obtain the value of
리턴 mixed value of given key if it exists, null otherwise

__isset() 공개 메소드

Check if a given key is set in the Assignment object
public __isset ( string $name ) : boolean
$name string key to check for in the object
리턴 boolean true if key set, false otherwise

__set() 공개 메소드

Set the value of a key in the object using the parameter name as salt
public __set ( string $name, mixed $value )
$name string key to set the value of
$value mixed value to set at the given index

__unset() 공개 메소드

Unset the value at a given key
public __unset ( string $name )
$name string key to unset the value of

asArray() 공개 메소드

Get the array representation of this Assignment
public asArray ( ) : array
리턴 array the Assignment's array representation

evaluate() 공개 메소드

Evaluate a given parameter and return its value. Currently just directly returns the given argument but can be modified with more complex behavior
public evaluate ( mixed $value )
$value mixed the parameter to evaluate

getOverrides() 공개 메소드

Get an array of all Assignment parameter overrides
public getOverrides ( ) : array
리턴 array the override array

setOverrides() 공개 메소드

Set overrides for the Assignment parameters
public setOverrides ( array $overrides )
$overrides array parameter name/value pairs to use as overrides