protected function setObjectProperty($object, $name, $value)
    {
        if (ClassInfo::hasMethod($object, 'set' . $name)) {
            $object->{'set' . $name}($value);
        } else {
            $object->$name = $value;
        }
    }