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, string $default) : mixed|null
Parameters
- $target_value : mixed
-
a value to transform.
- $transformer_configs : array<string|int, mixed>
-
transform configuration.
- $default : 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.