1 | <?php |
||
8 | class EntityUtils |
||
9 | { |
||
10 | /** |
||
11 | * Extract the value of a property from an entity. |
||
12 | * |
||
13 | * @param mixed $entity |
||
14 | * @param string $property |
||
15 | * |
||
16 | * @throws \InvalidArgumentException |
||
17 | * |
||
18 | * @return mixed |
||
19 | */ |
||
20 | 4 | public static function extractValueFromEntity($entity, $property) |
|
26 | |||
27 | /** |
||
28 | * @param mixed $entity |
||
29 | * @param string $property |
||
30 | * |
||
31 | * @throws \InvalidArgumentException |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | 4 | public static function createGetter($entity, $property) |
|
53 | |||
54 | /** |
||
55 | * @param mixed $entity |
||
56 | * @param string $property |
||
57 | * @param mixed $value |
||
58 | * |
||
59 | * @throws \InvalidArgumentException |
||
60 | */ |
||
61 | 1 | public static function setValueInEntity($entity, $property, $value) |
|
66 | |||
67 | /** |
||
68 | * @param mixed $entity |
||
69 | * @param string $property |
||
70 | * |
||
71 | * @throws \InvalidArgumentException |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 1 | public static function createSetter($entity, $property) |
|
86 | } |
||
87 |