class FieldValue

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

Methods

__construct(string $json)

Create a new FieldValue object from json string

string
__toString()

Convert to a empty string to avoid null pointer exceptions

__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
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

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

Details

at line 29
__construct(string $json)

Create a new FieldValue object from json string

Parameters

string $json

at line 48
string __toString()

Convert to a empty string to avoid null pointer exceptions

Return Value

string

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

Parameters

string $name

Return Value

FieldValue

at line 76
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 90
void override(array $input)

Overrides this data with the new input array

Parameters

array $input

Return Value

void

at line 114
void merge(array $input)

Merges in the array data into the field object json

Parameters

array $input

Return Value

void

at line 136
string toJSON()

Returns this object as json string

Return Value

string

at line 146
array toArray()

Returns this object as array

Return Value

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

Parameters

string $name
mixed $args

Return Value

mixed