@@ 39-42 (lines=4) @@ | ||
36 | $class = new class extends DynamicObject { |
|
37 | }; |
|
38 | ||
39 | foreach ($reflexion->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { |
|
40 | $method->setAccessible(true); |
|
41 | $class::addDynamicMethod($method->name, $method->getClosure($object)); |
|
42 | } |
|
43 | ||
44 | foreach ($reflexion->getMethods(\ReflectionMethod::IS_PROTECTED || \ReflectionMethod::IS_PRIVATE) as $method) { |
|
45 | $method->setAccessible(false); |
|
@@ 44-47 (lines=4) @@ | ||
41 | $class::addDynamicMethod($method->name, $method->getClosure($object)); |
|
42 | } |
|
43 | ||
44 | foreach ($reflexion->getMethods(\ReflectionMethod::IS_PROTECTED || \ReflectionMethod::IS_PRIVATE) as $method) { |
|
45 | $method->setAccessible(false); |
|
46 | $class::addDynamicMethod($method->name, $method->getClosure($object)); |
|
47 | } |
|
48 | ||
49 | foreach ($reflexion->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { |
|
50 | $property->setAccessible(true); |