Copied!

FieldValue

FieldValue.php : 11
Extends ValueObject

Base SPI Value object.

All properties of SPI\ValueObject must be serializable for cache & NoSQL use.

Properties

public $data

FieldValue.php : 23

Mixed field data.

public int|float|bool|string|array<string|int, mixed>|null $data

Either a scalar (primitive), null or an array (map) of scalar values.

Note: For the legacy storage engine we will need adaptors to map them to the existing database fields, like data_int, data_float, data_text.

public $externalData

FieldValue.php : 37

Mixed external field data.

public mixed $externalData

Data which is not stored in the field but at an external place. This data is processed by the field type storage interface method storeFieldData, if used by the FieldType, otherwise null.

Either a primitive, an array (map) or an object If object it must be serializable, for instance DOMDocument is not valid object.

public $sortKey

FieldValue.php : 47

A value which can be used for sorting.

public int|float|bool|string|null $sortKey

Note: For the "old" storage engine we will need adaptors to map them to the existing database fields, like sort_key_int, sort_key_string

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$properties array<string|int, mixed> [] -

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>