Core\DataTransformer\ValueToDuplicatesTransformer (Component\Form\Extension)

Symfony\Component\Form\Extension\Core\DataTransformer\ValueToDuplicatesTransformer

class ValueToDuplicatesTransformer implements DataTransformerInterface

Methods

__construct(array $keys)
array transform(mixed $value)

Duplicates the given value through the array.

mixed reverseTransform(array $array)

Extracts the duplicated value from an array.

Details

public __construct(array $keys)

Parameters

array $keys

public array transform(mixed $value)

Duplicates the given value through the array.

Parameters

mixed $value The value

Return Value

array The array

public mixed reverseTransform(array $array)

Extracts the duplicated value from an array.

Parameters

array $array

Return Value

mixed The value

Exceptions

TransformationFailedException If the given value is not an array or if the given array can not be transformed.
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部