1 | <?php |
||
23 | trait FieldMapperTrait |
||
24 | { |
||
25 | /** |
||
26 | * @var FieldMapper[] |
||
27 | */ |
||
28 | private $fieldMappers = array(); |
||
29 | |||
30 | /** |
||
31 | * {@inheritDoc} |
||
32 | */ |
||
33 | public function registerFieldMappers(array $fieldMappers) |
||
39 | |||
40 | /** |
||
41 | * Registers given FieldMapper instance |
||
42 | * Allows overwriting an already existing mapper for a given field |
||
43 | * |
||
44 | * @param FieldMapper $fieldMapper |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function registerFieldMapper(FieldMapper $fieldMapper) |
||
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | public function getFieldMapper($field) |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function getFieldMappers() |
||
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | public function mapperRegisteredForField($field) |
||
84 | } |
||
85 |