1 | <?php |
||
15 | class EntityToIdObjectTransformer implements DataTransformerInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var ObjectManager |
||
19 | */ |
||
20 | private $om; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $entityName; |
||
26 | |||
27 | /** |
||
28 | * @param ObjectManager $om |
||
29 | * @param string $entityName |
||
30 | */ |
||
31 | public function __construct(ObjectManager $om, $entityName) |
||
36 | |||
37 | /** |
||
38 | * Do nothing. |
||
39 | * |
||
40 | * @param object|null $object |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function transform($object) |
||
52 | |||
53 | /** |
||
54 | * Transforms an array including an identifier to an object. |
||
55 | * |
||
56 | * @param array $idObject |
||
57 | * |
||
58 | * @throws TransformationFailedException if object is not found |
||
59 | * |
||
60 | * @return object|null |
||
61 | */ |
||
62 | public function reverseTransform($idObject) |
||
79 | } |
||
|
|||
80 |
This check marks files that end in a newline character, i.e. an empy line.