1 | <?php |
||
10 | class Map implements PipeInterface |
||
11 | { |
||
12 | use IdentificationTrait; |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $field; |
||
17 | /** |
||
18 | * @var MapperCallbackInterface |
||
19 | */ |
||
20 | private $callback; |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $identifier; |
||
25 | |||
26 | 4 | public function __construct(string $identifier, string $field, MapperCallbackInterface $callback) |
|
32 | |||
33 | /** |
||
34 | * Mapping handler. |
||
35 | * Proceeds to transform an entry to a new value using callback function. |
||
36 | * |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 3 | public function pass(DataBagInterface $dataBag): DataBagInterface |
|
45 | } |
||
46 |