Copied!

LoadStruct

LoadStruct.php : 19
Extends ValueObject

Load struct for mass loading content or specific content versions.

Not in use anymore as of v7.2.3 as it was causing slow storage engine performance on large amount of bulk loading.

Design implies features such as always available and language logic needs to be done in API layer, so SPI gets a specifc query to deal with for the lookup that can be safely cached.

Tags
Deprecated

Not in use anymore as of v7.2.3 as it was causing slow storage engine performance on large amount of bulk loading.

Properties

public $id

LoadStruct.php : 26

Content's unique ID.

public mixed $id

public $languages

LoadStruct.php : 47

List of language code on translated properties of returned object.

public array<string|int, string> $languages = []

Should in the future be treated as prioritized languages by storage engine, returning only the first language matched.

public $versionNo

LoadStruct.php : 38

Version number for version we would like to load, current version will be assumed if null.

public int|null $versionNo

TIP: On usage with content load methods, if you need to be 100% sure current version is loaded, then let this stay as null. Otherwise there is a corner case possibility someone might have published a new version in-between loading content info to get version number and loading content, which can result in strange reports about permission errors as most users don't have version read access.

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>