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 |
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; }