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