PropertyPathMapper

PropertyPathMapper

class PropertyPathMapper implements DataMapperInterface

Maps arrays/objects to/from forms using property paths.

Methods

__construct(PropertyAccessorInterface $propertyAccessor = null)

Creates a new property path mapper.

mapDataToForms(mixed $data, FormInterface[] $forms)

Maps properties of some data to a list of forms.

mapFormsToData(FormInterface[] $forms, mixed $data)

Maps the data of a list of forms into the properties of some data.

Details

__construct(PropertyAccessorInterface $propertyAccessor = null)

Creates a new property path mapper.

Parameters

PropertyAccessorInterface $propertyAccessor The property accessor

mapDataToForms(mixed $data, FormInterface[] $forms)

Maps properties of some data to a list of forms.

Parameters

mixed $data Structured data.
FormInterface[] $forms A list of {@link FormInterface} instances.

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported.

mapFormsToData(FormInterface[] $forms, mixed $data)

Maps the data of a list of forms into the properties of some data.

Parameters

FormInterface[] $forms A list of {@link FormInterface} instances.
mixed $data Structured data.

Exceptions

UnexpectedTypeException if the type of the data parameter is not supported.
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部