ConstructionState
final class ConstructionState
Methods
Enter a nested data property.
Enter one data collection item.
Leave the current property or collection item.
Get the current traversal depth.
Get the current wire-key path.
Write a mapped property value beneath the current path.
Write a finished mapped property value beneath the current path.
Write a raw collection item beneath the current path.
Write a finished raw collection item beneath the current path.
Determine if a value exists beneath the current path.
Get a value beneath the current path.
Get the complete construction payload.
Get the payload at the current traversal path.
Replace the complete construction payload.
Record strict input beneath the current traversal path.
Get the merged strict input tree.
Record the chosen wire key for a property on the current node.
Replace one selected wire key during hook reconciliation.
Clear one changed child selection during hook reconciliation.
Reset the current class-owned selections during morph reconciliation.
Determine if a wire key was recorded for a property on the current node.
Get the chosen wire key for a property on the current node.
Record the concrete data class selected for the current node.
Get the concrete data class selected for the current node.
Record one automatic lazy property recipe.
Get one automatic lazy property recipe.
Record the paginator source for the current node.
Get the paginator source for the current node.
Clear the paginator source for the current node.
Determine if the current collection has one uniform recursive structure.
Get the compiled structure tree.
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.
at line 63
void
enterProperty(string $property, array $payloadPath)
Enter a nested data property.
at line 75
void
enterItem(string|int $index)
Enter one data collection item.
at line 87
void
leave()
Leave the current property or collection item.
at line 95
int
depth()
Get the current traversal depth.
at line 105
array
path()
Get the current wire-key path.
at line 121
void
writePropertyValue(array $path, mixed $value)
Write a mapped property value beneath the current path.
at line 135
void
writeFinishedPropertyValue(array $path, mixed $value)
Write a finished mapped property value beneath the current path.
at line 147
void
writeItemValue(string|int $key, mixed $value)
Write a raw collection item beneath the current path.
at line 155
void
writeFinishedItemValue(string|int $key, mixed $value)
Write a finished raw collection item beneath the current path.
at line 165
bool
hasValue(array $path)
Determine if a value exists beneath the current path.
at line 177
mixed
getValue(array $path)
Get a value beneath the current path.
at line 189
array
payload()
Get the complete construction payload.
at line 197
mixed
currentPayload()
Get the payload at the current traversal path.
at line 207
void
replacePayload(array $payload)
Replace the complete construction payload.
at line 217
void
recordUnknownInput(array $input)
Record strict input beneath the current traversal path.
at line 246
array|null
unknownInput()
Get the merged strict input tree.
at line 254
void
recordMapping(string $property, string|int $mappedKey)
Record the chosen wire key for a property on the current node.
at line 282
void
replaceMapping(string $property, string|int $mappedKey)
Replace one selected wire key during hook reconciliation.
at line 304
void
clearChildStructure(string $property)
Clear one changed child selection during hook reconciliation.
at line 321
void
resetNodeStructure()
Reset the current class-owned selections during morph reconciliation.
at line 342
bool
hasOriginalKey(string $property)
Determine if a wire key was recorded for a property on the current node.
at line 358
string|int
originalKey(string $property)
Get the chosen wire key for a property on the current node.
at line 380
void
setNodeClass(string $class)
Record the concrete data class selected for the current node.
at line 410
string|null
nodeClass()
Get the concrete data class selected for the current node.
at line 424
void
recordAutoLazy(string $property, mixed $source, AutoLazyReplayMode|null $replay = null)
Record one automatic lazy property recipe.
at line 447
array|UnknownProperty
autoLazy(string $property)
Get one automatic lazy property recipe.
at line 463
void
recordPaginatorSource(AbstractPaginator|AbstractCursorPaginator $source)
Record the paginator source for the current node.
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.
at line 522
bool
isCurrentCollectionUniform()
Determine if the current collection has one uniform recursive structure.
at line 532
array
structure()
Get the compiled structure tree.
at line 540
ConstructionState
snapshotForProperty(string $property)
Create a detached baseline for one automatic lazy property.