class LiveFieldValue

Field value is an object that holds json values for a DvsField model

Methods

__construct($json, $fieldId, $type)

Create a new FieldValue object from json string

[type]
__id()

[__id description]

[type]
__type()

[__type description]

__get(string $name)

Avoids null pointer exceptions by treating this like the empty string we only ever reach this magical method when we have attempted to fetch a key that does not exist on this FieldValue object

mixed
__call(string $name, mixed $args)

Allows us to set default values on a key if we do not have that key set in this FieldValue object

string
__toString()

This thing is just a string.

mixed
get(string $name, mixed $default = null)

Gets this field with this name, returns default if nothing is found.

void
override(array $input)

Overrides this data with the new input array

void
merge(array $input)

Merges in the array data into the field object json

string
toJSON()

Returns this object as json string

array
toArray()

Returns this object as array

void
extract()

This extracts the variables so they may be used.

void
unextract()

Un extracts all the keys on this thing could be useful if we need to undo an extract

Details

at line 25
__construct($json, $fieldId, $type)

Create a new FieldValue object from json string

Parameters

$json
$fieldId
$type

at line 40
[type] __id()

[__id description]

Return Value

[type]

at line 49
[type] __type()

[__type description]

Return Value

[type]

at line 64
FieldValue __get(string $name)

Avoids null pointer exceptions by treating this like the empty string we only ever reach this magical method when we have attempted to fetch a key that does not exist on this FieldValue object

Parameters

string $name

Return Value

FieldValue

at line 78
mixed __call(string $name, mixed $args)

Allows us to set default values on a key if we do not have that key set in this FieldValue object

Parameters

string $name
mixed $args

Return Value

mixed

at line 90
string __toString()

This thing is just a string.

..

Return Value

string

at line 103
mixed get(string $name, mixed $default = null)

Gets this field with this name, returns default if nothing is found.

..

Parameters

string $name
mixed $default

Return Value

mixed

at line 117
void override(array $input)

Overrides this data with the new input array

Parameters

array $input

Return Value

void

at line 132
void merge(array $input)

Merges in the array data into the field object json

Parameters

array $input

Return Value

void

at line 144
string toJSON()

Returns this object as json string

Return Value

string

at line 154
array toArray()

Returns this object as array

Return Value

array

at line 167
void extract()

This extracts the variables so they may be used.

This is not recommended to do as it will mess up LiveUpdate, but it is needed in certain cases (for example in FieldManager)

Return Value

void

at line 181
void unextract()

Un extracts all the keys on this thing could be useful if we need to undo an extract

Return Value

void