TransformationContext
final class TransformationContext
Methods
__construct(bool $transformValues = true, bool $mapPropertyNames = true, bool $constructable = false, PartialTree|null $include = null, PartialTree|null $exclude = null, PartialTree|null $only = null, PartialTree|null $except = null, array $partialDefinitions = ['include' => [], 'exclude' => [], 'only' => [], 'except' => []], array $transformers = [], WrapExecutionType $wrapExecutionType = WrapExecutionType::Disabled, int $depth = 0, int|null $maxDepth = null)
Create an immutable transformation context.
bool
hasPartials()
Determine if this operation has partial selections.
withMergedPartials(array $partialDefinitions)
Merge resolved instance partials into this context.
withWrapExecutionType(WrapExecutionType $wrapExecutionType)
Create the same context with different wrapping behavior.
array
partialsForNestedProperty(string $property)
Resolve partial definitions for a raw nested property.
child(string $property, WrapExecutionType|null $wrapExecutionType = null)
Create the context for one nested property.
Details
at line 19
__construct(bool $transformValues = true, bool $mapPropertyNames = true, bool $constructable = false, PartialTree|null $include = null, PartialTree|null $exclude = null, PartialTree|null $only = null, PartialTree|null $except = null, array $partialDefinitions = ['include' => [], 'exclude' => [], 'only' => [], 'except' => []], array $transformers = [], WrapExecutionType $wrapExecutionType = WrapExecutionType::Disabled, int $depth = 0, int|null $maxDepth = null)
Create an immutable transformation context.
at line 43
bool
hasPartials()
Determine if this operation has partial selections.
at line 56
TransformationContext
withMergedPartials(array $partialDefinitions)
Merge resolved instance partials into this context.
at line 85
TransformationContext
withWrapExecutionType(WrapExecutionType $wrapExecutionType)
Create the same context with different wrapping behavior.
at line 108
array
partialsForNestedProperty(string $property)
Resolve partial definitions for a raw nested property.
at line 131
TransformationContext
child(string $property, WrapExecutionType|null $wrapExecutionType = null)
Create the context for one nested property.