final class ConstructionState

Methods

create(CreationContext $context, string $class)

Create construction state for one root operation.

void
enterProperty(string $property, array $payloadPath)

Enter a nested data property.

void
enterItem(string|int $index)

Enter one data collection item.

void
leave()

Leave the current property or collection item.

int
depth()

Get the current traversal depth.

array
path()

Get the current wire-key path.

void
writePropertyValue(array $path, mixed $value)

Write a mapped property value beneath the current path.

void
writeFinishedPropertyValue(array $path, mixed $value)

Write a finished mapped property value beneath the current path.

void
writeItemValue(string|int $key, mixed $value)

Write a raw collection item beneath the current path.

void
writeFinishedItemValue(string|int $key, mixed $value)

Write a finished raw collection item beneath the current path.

bool
hasValue(array $path)

Determine if a value exists beneath the current path.

mixed
getValue(array $path)

Get a value beneath the current path.

array
payload()

Get the complete construction payload.

mixed
currentPayload()

Get the payload at the current traversal path.

void
replacePayload(array $payload)

Replace the complete construction payload.

void
recordUnknownInput(array $input)

Record strict input beneath the current traversal path.

array|null
unknownInput()

Get the merged strict input tree.

void
recordMapping(string $property, string|int $mappedKey)

Record the chosen wire key for a property on the current node.

void
replaceMapping(string $property, string|int $mappedKey)

Replace one selected wire key during hook reconciliation.

void
clearChildStructure(string $property)

Clear one changed child selection during hook reconciliation.

void
resetNodeStructure()

Reset the current class-owned selections during morph reconciliation.

bool
hasOriginalKey(string $property)

Determine if a wire key was recorded for a property on the current node.

string|int
originalKey(string $property)

Get the chosen wire key for a property on the current node.

void
setNodeClass(string $class)

Record the concrete data class selected for the current node.

string|null
nodeClass()

Get the concrete data class selected for the current node.

void
recordAutoLazy(string $property, mixed $source, AutoLazyReplayMode|null $replay = null)

Record one automatic lazy property recipe.

array|UnknownProperty
autoLazy(string $property)

Get one automatic lazy property recipe.

void
recordPaginatorSource(AbstractPaginator|AbstractCursorPaginator $source)

Record the paginator source for the current node.

paginatorSource()

Get the paginator source for the current node.

void
clearPaginatorSource()

Clear the paginator source for the current node.

bool
isCurrentCollectionUniform()

Determine if the current collection has one uniform recursive structure.

array
structure()

Get the compiled structure tree.

snapshotForProperty(string $property)

Create a detached baseline for one automatic lazy property.

Details

at line 53
static ConstructionState create(CreationContext $context, string $class)

Create construction state for one root operation.

Parameters

CreationContext $context
string $class

Return Value

ConstructionState

at line 63
void enterProperty(string $property, array $payloadPath)

Enter a nested data property.

Parameters

string $property
array $payloadPath

Return Value

void

at line 75
void enterItem(string|int $index)

Enter one data collection item.

Parameters

string|int $index

Return Value

void

at line 87
void leave()

Leave the current property or collection item.

Return Value

void

at line 95
int depth()

Get the current traversal depth.

Return Value

int

at line 105
array path()

Get the current wire-key path.

Return Value

array

at line 121
void writePropertyValue(array $path, mixed $value)

Write a mapped property value beneath the current path.

Parameters

array $path
mixed $value

Return Value

void

at line 135
void writeFinishedPropertyValue(array $path, mixed $value)

Write a finished mapped property value beneath the current path.

Parameters

array $path
mixed $value

Return Value

void

at line 147
void writeItemValue(string|int $key, mixed $value)

Write a raw collection item beneath the current path.

Parameters

string|int $key
mixed $value

Return Value

void

at line 155
void writeFinishedItemValue(string|int $key, mixed $value)

Write a finished raw collection item beneath the current path.

Parameters

string|int $key
mixed $value

Return Value

void

at line 165
bool hasValue(array $path)

Determine if a value exists beneath the current path.

Parameters

array $path

Return Value

bool

at line 177
mixed getValue(array $path)

Get a value beneath the current path.

Parameters

array $path

Return Value

mixed

at line 189
array payload()

Get the complete construction payload.

Return Value

array

at line 197
mixed currentPayload()

Get the payload at the current traversal path.

Return Value

mixed

at line 207
void replacePayload(array $payload)

Replace the complete construction payload.

Parameters

array $payload

Return Value

void

at line 217
void recordUnknownInput(array $input)

Record strict input beneath the current traversal path.

Parameters

array $input

Return Value

void

at line 246
array|null unknownInput()

Get the merged strict input tree.

Return Value

array|null

at line 254
void recordMapping(string $property, string|int $mappedKey)

Record the chosen wire key for a property on the current node.

Parameters

string $property
string|int $mappedKey

Return Value

void

at line 282
void replaceMapping(string $property, string|int $mappedKey)

Replace one selected wire key during hook reconciliation.

Parameters

string $property
string|int $mappedKey

Return Value

void

at line 304
void clearChildStructure(string $property)

Clear one changed child selection during hook reconciliation.

Parameters

string $property

Return Value

void

at line 321
void resetNodeStructure()

Reset the current class-owned selections during morph reconciliation.

Return Value

void

at line 342
bool hasOriginalKey(string $property)

Determine if a wire key was recorded for a property on the current node.

Parameters

string $property

Return Value

bool

at line 358
string|int originalKey(string $property)

Get the chosen wire key for a property on the current node.

Parameters

string $property

Return Value

string|int

at line 380
void setNodeClass(string $class)

Record the concrete data class selected for the current node.

Parameters

string $class

Return Value

void

at line 410
string|null nodeClass()

Get the concrete data class selected for the current node.

Return Value

string|null

at line 424
void recordAutoLazy(string $property, mixed $source, AutoLazyReplayMode|null $replay = null)

Record one automatic lazy property recipe.

Parameters

string $property
mixed $source
AutoLazyReplayMode|null $replay

Return Value

void

at line 447
array|UnknownProperty autoLazy(string $property)

Get one automatic lazy property recipe.

Parameters

string $property

Return Value

array|UnknownProperty

at line 463
void recordPaginatorSource(AbstractPaginator|AbstractCursorPaginator $source)

Record the paginator source for the current node.

Parameters

AbstractPaginator|AbstractCursorPaginator $source

Return Value

void

at line 480
AbstractPaginator|AbstractCursorPaginator|null paginatorSource()

Get the paginator source for the current node.

Item reads never fall back to the collection template because paginator metadata belongs to one concrete source value.

at line 492
void clearPaginatorSource()

Clear the paginator source for the current node.

Return Value

void

at line 522
bool isCurrentCollectionUniform()

Determine if the current collection has one uniform recursive structure.

Return Value

bool

at line 532
array structure()

Get the compiled structure tree.

Return Value

array

at line 540
ConstructionState snapshotForProperty(string $property)

Create a detached baseline for one automatic lazy property.

Parameters

string $property

Return Value

ConstructionState