TransformerService
in package
A simple service class for the Transformer classes.
Class TransformerService
Table of Contents
- apply() : mixed|null
- Apply transformers to the given value.
- create_transformer() : TransformerInterface|null
- Create a transformer object by name.
Methods
apply()
Apply transformers to the given value.
public
static apply(mixed $target_value, array<string|int, mixed> $transformer_configs, bool $is_default_set, string $default_value) : mixed|null
Parameters
- $target_value : mixed
-
a value to transform.
- $transformer_configs : array<string|int, mixed>
-
transform configuration.
- $is_default_set : bool
-
flag on is default value set.
- $default_value : string
-
default value.
Tags
Return values
mixed|null —create_transformer()
Create a transformer object by name.
public
static create_transformer(string $name) : TransformerInterface|null
Parameters
- $name : string
-
name of the transformer.