Allow to hold a list of sub-transformers and recursively configure their options.
- Namespace:
CleverAge\ProcessBundle\Transformer\TransformerTrait
- Options algorithm:
- for each element: the key maps to a transformer code, and the value are resolved by the matching transformer
- note that the key may be followed by
#
and any digit, to allow multiple transformer of the same type. Example:
transformers:
transformer_code#1:
some_options: ~
transformer_code#2:
some_options: ~
- Call
TransformerTrait::configureTransformersOptions
with your ownOptionResolver
. You can change$optionName
if you want a custom option name - Call
TransformerTrait::applyTransformers
with the resolved transformer options (i.e.$options["transformers"]
) and the value you want to pass