|
ReflectionProperty::setAccessibleSet property accessibility Description
public void ReflectionProperty::setAccessible(bool
$accessible )Enables access to a protected or private property via the ReflectionProperty::getValue and ReflectionProperty::setValue methods.
Parameters
Return ValuesNo value is returned. ExamplesExample #1 Simple Class definition
The above example will output something similar to: bar Fatal error: Uncaught Error: Cannot access private property MyClass::$foo in /in/WJqTv:12 See Also
|