Symfony2 API
Class

Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper

class PropertyPathMapper implements DataMapperInterface

A data mapper using property paths to read/write data.

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

at line 36
public __construct(PropertyAccessorInterface $propertyAccessor = null)

Creates a new property path mapper.

Parameters

PropertyAccessorInterface $propertyAccessor

at line 44
public 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.

at line 67
public 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.