inspectProperty() 보호된 메소드

Checks property first, falls back to setter method.
protected inspectProperty ( ReflectionClass $rc, string $name ) : array
$rc ReflectionClass Reflection class to check
$name string Property name
리턴 array First value: if the property exists Second value: the accessor to use ( ReflectionMethod or ReflectionProperty, or null) Third value: type of the property
예제 #1
0
 protected function inspectProperty(\ReflectionClass $rc, $name)
 {
     $ret = parent::inspectProperty($rc, $name);
     if ($ret[0] === false) {
         if ($rc->hasMethod('__set')) {
             $a = $rc->getMethod('__set');
             return [true, new ReflectionContainer($a, $name), 'mixed'];
         }
     }
     return $ret;
 }