]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | <?php |
2 | ||
3 | /* | |
4 | * This file is part of the Symfony package. | |
5 | * | |
6 | * (c) Fabien Potencier <fabien@symfony.com> | |
7 | * | |
8 | * For the full copyright and license information, please view the LICENSE | |
9 | * file that was distributed with this source code. | |
10 | */ | |
11 | ||
12 | namespace Symfony\Component\Form; | |
13 | ||
14 | /** | |
15 | * @author Bernhard Schussek <bschussek@gmail.com> | |
16 | */ | |
17 | interface DataMapperInterface | |
18 | { | |
19 | /** | |
20 | * Maps properties of some data to a list of forms. | |
21 | * | |
22 | * @param mixed $data Structured data. | |
23 | * @param FormInterface[] $forms A list of {@link FormInterface} instances. | |
24 | * | |
25 | * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported. | |
26 | */ | |
27 | public function mapDataToForms($data, $forms); | |
28 | ||
29 | /** | |
30 | * Maps the data of a list of forms into the properties of some data. | |
31 | * | |
32 | * @param FormInterface[] $forms A list of {@link FormInterface} instances. | |
33 | * @param mixed $data Structured data. | |
34 | * | |
35 | * @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported. | |
36 | */ | |
37 | public function mapFormsToData($forms, &$data); | |
38 | } |