@@ 28-36 (lines=9) @@ | ||
25 | return $reflectionMethod->invoke($object); |
|
26 | } |
|
27 | } |
|
28 | if ($reflectionClass->hasProperty($field)) { |
|
29 | $property = $reflectionClass->getProperty($field); |
|
30 | if (!$property->isStatic()) { |
|
31 | if (!$property->isPublic()) { |
|
32 | $property->setAccessible(true); |
|
33 | } |
|
34 | return $property->getValue($object); |
|
35 | } |
|
36 | } |
|
37 | if (is_array($object) || $object instanceof \ArrayAccess) { |
|
38 | return $object[$field]; |
|
39 | } |
|
@@ 63-72 (lines=10) @@ | ||
60 | return; |
|
61 | } |
|
62 | } |
|
63 | if ($reflectionClass->hasProperty($field)) { |
|
64 | $property = $reflectionClass->getProperty($field); |
|
65 | if (!$property->isStatic()) { |
|
66 | if (!$property->isPublic()) { |
|
67 | $property->setAccessible(true); |
|
68 | } |
|
69 | $property->setValue($object, $value); |
|
70 | return; |
|
71 | } |
|
72 | } |
|
73 | if (is_array($object) || $object instanceof \ArrayAccess) { |
|
74 | $object[$field] = $value; |
|
75 | return; |