TransformationContextFactory
class TransformationContextFactory implements Transient
Traits
Properties
| protected bool | $transformValues | ||
| protected bool | $mapPropertyNames | ||
| protected bool | $constructable | ||
| protected WrapExecutionType | $wrapExecutionType | ||
| protected Transformer>|Transformer> | $transformers | ||
| protected int|null | $maxDepth | ||
| protected int|null | $configuredMaxDepth | ||
| protected PartialsDefinition | $partialDefinitions |
Methods
Get the partial definition store.
Include properties for the next transformation.
Include properties for every transformation.
Exclude lazy properties for the next transformation.
Exclude lazy properties for every transformation.
Keep only properties for the next transformation.
Keep only properties for every transformation.
Exclude properties for the next transformation.
Exclude properties for every transformation.
Include a property when the condition passes.
Exclude a lazy property when the condition passes.
Exclude a property when the condition passes.
Create a fresh transformation context factory.
Create a fresh constructable persistence context factory.
Create the immutable constructable persistence context.
Build the context for one root transformation.
Enable or disable value transformation.
Disable or enable value transformation.
Enable or disable output property-name mapping.
Disable or enable output property-name mapping.
Set wrapping behavior for the transformation.
Disable wrapping for the transformation.
Enable wrapping for the transformation.
Add a transformer for one declared or runtime type.
Set the maximum nested transformation depth.
Details
at line 245
protected PartialsDefinition
getPartialsDefinition()
Get the partial definition store.
in
ForwardsToPartialsDefinition at line 19
ForwardsToPartialsDefinition
include(string ...$includes)
Include properties for the next transformation.
in
ForwardsToPartialsDefinition at line 31
ForwardsToPartialsDefinition
includePermanently(string ...$includes)
Include properties for every transformation.
in
ForwardsToPartialsDefinition at line 43
ForwardsToPartialsDefinition
exclude(string ...$excludes)
Exclude lazy properties for the next transformation.
in
ForwardsToPartialsDefinition at line 55
ForwardsToPartialsDefinition
excludePermanently(string ...$excludes)
Exclude lazy properties for every transformation.
in
ForwardsToPartialsDefinition at line 67
ForwardsToPartialsDefinition
only(string ...$only)
Keep only properties for the next transformation.
in
ForwardsToPartialsDefinition at line 79
ForwardsToPartialsDefinition
onlyPermanently(string ...$only)
Keep only properties for every transformation.
in
ForwardsToPartialsDefinition at line 91
ForwardsToPartialsDefinition
except(string ...$except)
Exclude properties for the next transformation.
in
ForwardsToPartialsDefinition at line 103
ForwardsToPartialsDefinition
exceptPermanently(string ...$except)
Exclude properties for every transformation.
in
ForwardsToPartialsDefinition at line 115
ForwardsToPartialsDefinition
includeWhen(string $include, bool|Closure $condition, bool $permanent = false)
Include a property when the condition passes.
in
ForwardsToPartialsDefinition at line 132
ForwardsToPartialsDefinition
excludeWhen(string $exclude, bool|Closure $condition, bool $permanent = false)
Exclude a lazy property when the condition passes.
in
ForwardsToPartialsDefinition at line 149
ForwardsToPartialsDefinition
onlyWhen(string $only, bool|Closure $condition, bool $permanent = false)
Keep only a property when the condition passes.
in
ForwardsToPartialsDefinition at line 166
ForwardsToPartialsDefinition
exceptWhen(string $except, bool|Closure $condition, bool $permanent = false)
Exclude a property when the condition passes.
at line 41
__construct(DataConfig $config)
Create a transformation context factory.
at line 51
static TransformationContextFactory
create()
Create a fresh transformation context factory.
at line 60
static TransformationContextFactory
forPersistence()
Create a fresh constructable persistence context factory.
at line 71
static TransformationContext
persistenceContext(int|null $maxDepth)
Create the immutable constructable persistence context.
at line 86
TransformationContext
get(object $data)
Build the context for one root transformation.
at line 136
TransformationContextFactory
withValueTransformation(bool $transformValues = true)
Enable or disable value transformation.
at line 146
TransformationContextFactory
withoutValueTransformation(bool $withoutValueTransformation = true)
Disable or enable value transformation.
at line 156
TransformationContextFactory
withPropertyNameMapping(bool $mapPropertyNames = true)
Enable or disable output property-name mapping.
at line 166
TransformationContextFactory
withoutPropertyNameMapping(bool $withoutPropertyNameMapping = true)
Disable or enable output property-name mapping.
at line 176
TransformationContextFactory
withWrapExecutionType(WrapExecutionType $wrapExecutionType)
Set wrapping behavior for the transformation.
at line 186
TransformationContextFactory
withoutWrapping()
Disable wrapping for the transformation.
at line 196
TransformationContextFactory
withWrapping()
Enable wrapping for the transformation.
at line 208
TransformationContextFactory
withTransformer(string $transformable, Transformer|string $transformer)
Add a transformer for one declared or runtime type.
at line 218
TransformationContextFactory
maxDepth(int|null $maxDepth)
Set the maximum nested transformation depth.