1 | <?php |
||
14 | class MappingStep implements Step |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $mappings = []; |
||
20 | |||
21 | /** |
||
22 | * @var PropertyAccessor |
||
23 | */ |
||
24 | private $accessor; |
||
25 | |||
26 | /** |
||
27 | * @param array $mappings |
||
28 | * @param PropertyAccessor $accessor |
||
29 | */ |
||
30 | 2 | public function __construct(array $mappings = [], PropertyAccessor $accessor = null) |
|
35 | |||
36 | /** |
||
37 | * @param string $from |
||
38 | * @param string $to |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | 2 | public function map($from, $to) |
|
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | * |
||
52 | * @throws MappingException |
||
53 | */ |
||
54 | 2 | public function process(&$item) |
|
75 | } |
||
76 |