setAccessible(true); $refProperty->setValue($object, $value); $refProperty->setAccessible(false); } }