class DataTransformerChain implements DataTransformerInterface
Passes a value through multiple value transformers.
protected | $transformers |
__construct(array $transformers) Uses the given value transformers to transform values. | ||
mixed | transform(mixed $value) Passes the value through the transform() method of all nested transformers. | |
mixed | reverseTransform(mixed $value) Passes the value through the reverseTransform() method of all nested transformers. | |
DataTransformerInterface[] | getTransformers() |
Uses the given value transformers to transform values.
array | $transformers |
Passes the value through the transform() method of all nested transformers.
The transformers receive the value in the same order as they were passed to the constructor. Each transformer receives the result of the previous transformer as input. The output of the last transformer is returned by this method.
mixed | $value | The value in the original representation |
mixed | The value in the transformed representation |
TransformationFailedException |
Passes the value through the reverseTransform() method of all nested transformers.
The transformers receive the value in the reverse order as they were passed to the constructor. Each transformer receives the result of the previous transformer as input. The output of the last transformer is returned by this method.
mixed | $value | The value in the transformed representation |
mixed | The value in the original representation |
TransformationFailedException |
DataTransformerInterface[] |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/Extension/Core/DataTransformer/DataTransformerChain.html