Php/docs/reflectionproperty.setaccessible
来自菜鸟教程
ReflectionProperty::setAccessible
(PHP 5 >= 5.3.0, PHP 7)
ReflectionProperty::setAccessible — Set property accessibility
说明
public ReflectionProperty::setAccessible
( bool $accessible
) : void
Sets a property to be accessible. For example, it may allow protected and private properties to be accessed.
参数
accessible
true
to allow accessibility, orfalse
.
返回值
没有返回值。
参见
- ReflectionProperty::isPrivate() - Checks if property is private
- ReflectionProperty::isProtected() - Checks if property is protected