ChoicesToValuesTransformer

ChoicesToValuesTransformer

class ChoicesToValuesTransformer implements DataTransformerInterface

Methods

__construct(ChoiceListInterface $choiceList)

Constructor.

mixed transform(array $array)
mixed reverseTransform(array $array)

Details

__construct(ChoiceListInterface $choiceList)

Constructor.

Parameters

ChoiceListInterface $choiceList

mixed transform(array $array)

Parameters

array $array

Return Value

mixed The value in the transformed representation

Exceptions

TransformationFailedException If the given value is not an array.

mixed reverseTransform(array $array)

Parameters

array $array

Return Value

mixed The value in the original representation

Exceptions

TransformationFailedException If the given value is not an array or if no matching choice could be found for some given value.
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部