1 | <?php |
||
15 | class FieldMapper implements FieldMapperInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var FieldMapperInterface[] |
||
19 | */ |
||
20 | private $mappers = []; |
||
21 | |||
22 | /** |
||
23 | * @param FieldMapperInterface $mapper mapper to add |
||
24 | * |
||
25 | * @return void |
||
26 | */ |
||
27 | 6 | public function addMapper(FieldMapperInterface $mapper) |
|
31 | |||
32 | /** |
||
33 | * builds the initial fields array with a json definition |
||
34 | * |
||
35 | * @param JsonDefinition $jsonDefinition definition |
||
36 | * |
||
37 | * @return array fields |
||
38 | */ |
||
39 | public function buildFields(JsonDefinition $jsonDefinition) |
||
53 | |||
54 | /** |
||
55 | * @param array $field mappable field with type attribute |
||
56 | * @param mixed $context context for mapper to check |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | 2 | public function map($field, $context = null) |
|
67 | } |
||
68 |