LiveFieldValue
class LiveFieldValue
Field value is an object that holds json values for a DvsField model
Methods
Create a new FieldValue object from json string
[__id description]
[__type description]
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
Allows us to set default values on a key if we do not have that key set in this FieldValue object
This thing is just a string.
Gets this field with this name, returns default if nothing is found.
Overrides this data with the new input array
Merges in the array data into the field object json
Returns this object as json string
Returns this object as array
This extracts the variables so they may be used.
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
at line 40
[type]
__id()
[__id description]
at line 49
[type]
__type()
[__type description]
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
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
at line 90
string
__toString()
This thing is just a string.
..
at line 103
mixed
get(string $name, mixed $default = null)
Gets this field with this name, returns default if nothing is found.
..
at line 117
void
override(array $input)
Overrides this data with the new input array
at line 132
void
merge(array $input)
Merges in the array data into the field object json
at line 144
string
toJSON()
Returns this object as json string
at line 154
array
toArray()
Returns this object as 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)
at line 181
void
unextract()
Un extracts all the keys on this thing could be useful if we need to undo an extract