PlainDataResolver
Plain data resolving.
This component resolves data constraints for given IDs of a particular table on a plain/raw database level. Thus, workspaces placeholders and overlay related resorting is applied automatically.
Table of Contents
Properties
- $keepDeletePlaceholder : bool
- $keepLiveIds : bool
- $keepMovePlaceholder : bool
- $liveIds : array<string|int, int>
- $sortingStatement : array<string|int, mixed>|null
- $tableName : string
- $workspaceId : int
Methods
- __construct() : mixed
- applyLiveIds() : array<string|int, int>
- Applies live IDs to the final result set, if the current table is enabled for workspaces and the keepLiveIds class member is enabled.
- get() : array<string|int, int>
- processSorting() : array<string|int, int>
- Processes sorting of the final result set, if a sorting statement (table column/expression) is given.
- processVersionMovePlaceholders() : array<string|int, int>
- Processes and resolves move placeholders on the final result set.
- processVersionOverlays() : array<string|int, int>
- Processes version overlays on the final result set.
- setKeepDeletePlaceholder() : PlainDataResolver
- Sets whether delete placeholders shall be kept in the final result set.
- setKeepLiveIds() : PlainDataResolver
- Sets whether live IDs shall be kept in the final result set.
- setKeepMovePlaceholder() : PlainDataResolver
- Sets whether move placeholders shall be kept in case they cannot be substituted.
- setWorkspaceId() : mixed
- Sets the target workspace ID the final result shall use.
- isWorkspaceEnabled() : bool
- reindex() : array<string|int, int>
- Re-indexes the given IDs.
- sanitizeIds() : array<string|int, mixed>
- Removes empty values (null, '0', 0, false).
Properties
$keepDeletePlaceholder
protected
bool
$keepDeletePlaceholder
= false
$keepLiveIds
protected
bool
$keepLiveIds
= false
$keepMovePlaceholder
protected
bool
$keepMovePlaceholder
= true
$liveIds
protected
array<string|int, int>
$liveIds
$sortingStatement
protected
array<string|int, mixed>|null
$sortingStatement
$tableName
protected
string
$tableName
$workspaceId
protected
int
$workspaceId
Methods
__construct()
public
__construct(string $tableName, array<string|int, int> $liveIds[, array<string|int, mixed>|null $sortingStatement = null ]) : mixed
Parameters
- $tableName : string
- $liveIds : array<string|int, int>
- $sortingStatement : array<string|int, mixed>|null = null
applyLiveIds()
Applies live IDs to the final result set, if the current table is enabled for workspaces and the keepLiveIds class member is enabled.
public
applyLiveIds(array<string|int, int> $ids) : array<string|int, int>
Parameters
- $ids : array<string|int, int>
Return values
array<string|int, int>get()
public
get() : array<string|int, int>
Return values
array<string|int, int>processSorting()
Processes sorting of the final result set, if a sorting statement (table column/expression) is given.
public
processSorting(array<string|int, int> $ids) : array<string|int, int>
Parameters
- $ids : array<string|int, int>
Return values
array<string|int, int>processVersionMovePlaceholders()
Processes and resolves move placeholders on the final result set.
public
processVersionMovePlaceholders(array<string|int, int> $ids) : array<string|int, int>
Parameters
- $ids : array<string|int, int>
Return values
array<string|int, int>processVersionOverlays()
Processes version overlays on the final result set.
public
processVersionOverlays(array<string|int, int> $ids) : array<string|int, int>
Parameters
- $ids : array<string|int, int>
Return values
array<string|int, int>setKeepDeletePlaceholder()
Sets whether delete placeholders shall be kept in the final result set.
public
setKeepDeletePlaceholder(bool $keepDeletePlaceholder) : PlainDataResolver
Parameters
- $keepDeletePlaceholder : bool
Return values
PlainDataResolversetKeepLiveIds()
Sets whether live IDs shall be kept in the final result set.
public
setKeepLiveIds(bool $keepLiveIds) : PlainDataResolver
Parameters
- $keepLiveIds : bool
Return values
PlainDataResolversetKeepMovePlaceholder()
Sets whether move placeholders shall be kept in case they cannot be substituted.
public
setKeepMovePlaceholder(bool $keepMovePlaceholder) : PlainDataResolver
Parameters
- $keepMovePlaceholder : bool
Return values
PlainDataResolversetWorkspaceId()
Sets the target workspace ID the final result shall use.
public
setWorkspaceId(int $workspaceId) : mixed
Parameters
- $workspaceId : int
isWorkspaceEnabled()
protected
isWorkspaceEnabled() : bool
Return values
boolreindex()
Re-indexes the given IDs.
protected
reindex(array<string|int, int> $ids) : array<string|int, int>
Parameters
- $ids : array<string|int, int>
Return values
array<string|int, int>sanitizeIds()
Removes empty values (null, '0', 0, false).
protected
sanitizeIds(array<string|int, int> $ids) : array<string|int, mixed>
Parameters
- $ids : array<string|int, int>