mediatekformation

DataTransformerChain
in package
implements DataTransformerInterface

Passes a value through multiple value transformers.

Tags
author

Bernhard Schussek bschussek@gmail.com

Interfaces, Classes, Traits and Enums

DataTransformerInterface
Transforms a value between different representations.

Table of Contents

$transformers  : mixed
__construct()  : mixed
Uses the given value transformers to transform values.
getTransformers()  : array<string|int, DataTransformerInterface>
reverseTransform()  : mixed
Passes the value through the reverseTransform() method of all nested transformers.
transform()  : mixed
Passes the value through the transform() method of all nested transformers.

Properties

Methods

reverseTransform()

Passes the value through the reverseTransform() method of all nested transformers.

public reverseTransform(mixed $value) : mixed

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.

Parameters
$value : mixed

The transformed value

Tags
throws
TransformationFailedException
Return values
mixed

The reverse-transformed value

transform()

Passes the value through the transform() method of all nested transformers.

public transform(mixed $value) : mixed

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.

Parameters
$value : mixed

The original value

Tags
throws
TransformationFailedException
Return values
mixed

The transformed value

Search results