|
ReflectionProperty::setValueSet property value Beschreibung
public void ReflectionProperty::setValue
( object
$object
, mixed $value
)
public void ReflectionProperty::setValue
( mixed
$value
)Sets (changes) the property's value. Parameter-Liste
RückgabewerteEs wird kein Wert zurückgegeben. Fehler/ExceptionsThrows a ReflectionException if the property is inaccessible. You can make a protected or private property accessible using ReflectionProperty::setAccessible. Beispiele
Beispiel #1 ReflectionProperty::setValue example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe: string(3) "foo" string(3) "bar" string(6) "foobar" Siehe auch
|