Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public static function setProperty($object, $property, $value) |
||
29 | { |
||
30 | static $reflection; |
||
31 | |||
32 | if (null === $reflection) { |
||
33 | $reflection = new \ReflectionClass('Saxulum\JsonDocument\AbstractNode'); |
||
34 | } |
||
35 | |||
36 | $pRef = $reflection->getProperty($property); |
||
37 | $pRef->setAccessible(true); |
||
38 | $pRef->setValue($object, $value); |
||
39 | $pRef->setAccessible(false); |
||
40 | } |
||
41 | } |
||
42 |