1 | <?php |
||
5 | trait MaintainsTransformations { |
||
6 | |||
7 | /** |
||
8 | * |
||
9 | * @var array |
||
10 | */ |
||
11 | protected $valueTransformations = []; |
||
12 | |||
13 | /** |
||
14 | * |
||
15 | * @param mixed $id |
||
16 | * @param callable $transformation |
||
17 | */ |
||
18 | public function setValueTransformation($id, callable $transformation) { |
||
21 | |||
22 | /** |
||
23 | * Returns the given value with all transformations applied |
||
24 | * |
||
25 | * @param mixed $value |
||
26 | */ |
||
27 | public function withTransformations($value) { |
||
37 | |||
38 | } |
||
39 |