1 | <?php |
||
15 | trait DataTransformerLoaderTrait |
||
16 | { |
||
17 | /** |
||
18 | * Model -> View |
||
19 | * |
||
20 | * @see DataTransformerInterface::transform() |
||
21 | */ |
||
22 | public function transform($entity) |
||
37 | |||
38 | /** |
||
39 | * View -> Model |
||
40 | * |
||
41 | * @see DataTransformerInterface::reverseTransform() |
||
42 | */ |
||
43 | public function reverseTransform($id) |
||
58 | } |
||
59 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: