FieldValue
class FieldValue
Field value is an object that holds json values for a DvsField model
Methods
Create a new FieldValue object from json string
Convert to a empty string to avoid null pointer exceptions
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
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
Allows us to set default values on a key if we do not have that key set in this FieldValue object
Details
at line 29
__construct(string $json)
Create a new FieldValue object from json string
at line 48
string
__toString()
Convert to a empty string to avoid null pointer exceptions
at line 63
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 76
mixed
get(string $name, mixed $default = null)
Gets this field with this name, returns default if nothing is found.
..
at line 90
void
override(array $input)
Overrides this data with the new input array
at line 114
void
merge(array $input)
Merges in the array data into the field object json
at line 136
string
toJSON()
Returns this object as json string
at line 146
array
toArray()
Returns this object as array
at line 160
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