PHP Класс Vimeo\ABLincoln\Assignment

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__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