1 | <?php |
||
15 | class ExecuteMappingFluentSyntax |
||
16 | { |
||
17 | private $context; |
||
18 | private $engine; |
||
19 | |||
20 | public function __construct(Engine $engine, $source, $sourceType = null) |
||
26 | |||
27 | /** |
||
28 | * Execute a mapping to the existing destination object. |
||
29 | * If no Map exists then one is created. |
||
30 | * |
||
31 | * @param object|object[] $destination Destination object or collection to map into |
||
32 | * @param string|null $destinationType Destination type to map |
||
33 | * @return object|object[] The mapped destination object, same instance as the $destination object |
||
34 | * @throws NotSupportedException |
||
35 | * @throws MappingException |
||
36 | */ |
||
37 | public function to($destination, $destinationType = null) |
||
42 | |||
43 | /** |
||
44 | * Execute a mapping to a new destination object. |
||
45 | * If no Map exists then one is created. |
||
46 | * |
||
47 | * @param string $destinationType Destination type to create and map |
||
48 | * @return object|object[] |
||
49 | * @throws NotSupportedException |
||
50 | * @throws MappingException |
||
51 | */ |
||
52 | public function toType($destinationType) |
||
57 | } |
||
58 |