Call a setter of the object

@param object $object
@param mixed  $value
@param string $setter
161306
protected function setValue($object, $value, $setter)
    {
        if (method_exists($object, $setter)) {
            $object->$setter($value);
        }
    }
892707
public static function set(array &$object, $keys, $value)
    {
        $keys = explode('.', $keys);
        $depth = count($keys);
        $key = array_shift($keys);

        if (1 === $depth) {
            $object[$key] = $value;
        } else {
            if (!isset($object[$key])) {
                $object[$key] = [];
            } elseif (!is_array($object[$key])) {
                throw new \Exception('Cannot set property because it already exists as a non \stdClass');
            }

            static::set($object[$key], implode('.', $keys), $value);
        }
    }
527689
public function offsetSet($object, $value)
    {
        if (!$object instanceof KObjectHandlable) {
            throw new InvalidArgumentException('Object needs to implement KObjectHandlable');
        }

        $this->_data[$object->getHandle()] = $object;
        return $this;
    }
1115049
public static function setPropertyValue($object, $property, $value)
    {
        $reflectionProperty = self::getProperty($object, $property);

        // Oops, property does not exist
        if (null === $reflectionProperty) {
            throw NotExistingPropertyException::create($object, $property);
        }

        $isPublic = $reflectionProperty->isPublic();

        if (!$isPublic) {
            $reflectionProperty->setAccessible(true);
        }

        $reflectionProperty->setValue($object, $value);

        if (!$isPublic) {
            $reflectionProperty->setAccessible(false);
        }
    }
404033
public static void set(Object obj, String property, Object value) throws Throwable {
        getSetterMethod(obj.getClass(), property).invoke(obj, value);
    }
346352
public static function set(&$object, $name, $value)
    {
        $names = explode('.', $name);
        $lastName = array_pop($names);
        $data = &$object;
        foreach ($names as $nameItem)
        {
            if(is_array($data))
            {
                if (!isset($data[$nameItem]))
                {
                    $data[$nameItem] = [];
                }
                $data = &$data[$nameItem];
            }
            else if(is_object($data))
            {
                if (!isset($data->$nameItem))
                {
                    $data->$nameItem = new stdClass;
                }
                $data = &$data->$nameItem;
            }
        }
        if(is_array($data))
        {
            $data[$lastName] = $value;
        }
        else if(is_object($data))
        {
            $data->$lastName = $value;
        }
    }
834405
public function sipe($prop, $setter, $data = [], $object, $trim = true)
    {
        if ($data && is_array($data)) {
            try {
                $value = ArrayUtils::get($data, $prop);

                if (is_string($value) && $trim) {
                    $value = trim($value);
                }

                $object->{$setter}($value);
            } catch (\Exception $e) {
            }
        }
    }
571853
public static function set(& $object, $key, $value)
    {
        if (static::isArray($object))
            $object[$key] = $value;

        if (static::isObject($object))
            $object->$key = $value;

        return $object;
    }
841568
function set($key, $value) {
        if(\is_array($key) || \is_object($key)) {
            throw new \InvalidArgumentException('Key can not be an array or object');
        }
        
        $key = (string) $key;
        return parent::set($key, $value);
    }
246626
function set($value, $clone = true)
    {
        if ($clone && is_object($value) && !$value instanceof \Exception){
            $this->value = clone $value;
        }else{
            $this->value = $value;
        }
        $this->format = null;
        return $this;
    }
552238
public function set($name, $value) {
		$this->vars[$name] = is_object($value) ? (method_exists($value, 'fetch') ? $value->fetch() : $value) : $value;
	}
457765
public static function setPropertyValue($object, string $property, $value, $scope = 'static')
    {
        $setPropertyValue = function ($value) use ($object, $property) {
            if (is_object($object)) {
                $object->$property = $value;
            } else {
                $object::$$property = $value;
            }
        };
        $setPropertyValue = $setPropertyValue->bindTo(is_object($object) ? $object : null, $scope);
        $setPropertyValue($value);
    }
678142
public void set(Object object, Object value) throws IllegalAccessException, IllegalArgumentException {
        if (null != setter) {
            try {
                setter.invoke(object, value);
            } catch (InvocationTargetException ite) {
                if (ite.getCause() instanceof RuntimeException && !(ite.getCause() instanceof JTransfoException)) {
                    throw (RuntimeException) ite.getCause();
                }
                throw new JTransfoException(String.format(GET_SET_ITO, setter.getName(), object.getClass().getName(),
                        setter.getDeclaringClass().getName(), ite.getCause().getMessage()), ite.getCause());
            }
        } else {
            if (!setUsingFieldLogged) {
                log.warn("Cannot find setter (not public, wrong name or wrong type), "
                                + "using field to access field {} of {}.", name, field.getType().getName());
                setUsingFieldLogged = true;
            }
            field.set(object, value);
        }
    }
454169
public function setValue($value) : void
    {
        if (is_object($value) && !($value instanceof ArrayObject)) {
            $this->class = $value;
            if (isset($this->value)) {
                $old = clone $this->value;
                $work = clone $value;
                if ($work instanceof JsonSerializable) {
                    $work = $work->jsonSerialize();
                }
                foreach ($work as $prop => $status) {
                    $value->$prop = isset($old->$prop) ? $old->$prop : false;
                }
            }
            $this->value = $value;
        }
        if (!isset($this->value)) {
            $this->value = clone $this->class;
        }
        if (is_array($value) || $value instanceof ArrayObject) {
            $work = clone $this->value;
            if ($work instanceof JsonSerializable) {
                $work = $work->jsonSerialize();
            }
            foreach ($work as $prop => $status) {
                $this->value->$prop = false;
            }
            foreach ($value as $prop) {
                if (is_string($prop) && $this->hasBit($prop) && isset($this->value->$prop)) {
                    $this->value->$prop = true;
                }
            }
        }
        $found = [];
        foreach ((array)$this as $element) {
            if ($element->getElement() instanceof Hidden) {
                continue;
            }
            $check = $element->getElement()->getValue();
            if (isset($this->value->$check) && $this->value->$check) {
                $element->getElement()->check();
            } else {
                $element->getElement()->check(false);
            }
            $found[] = $check;
        }
    }
721313
function set($item, $value)
    {
        if (isset($this->$item)) {
            $this->$item = $value;
            return $this;
        }
        return false;
    }
1101604
public function _set($name, $value)
    {
        $setMethod = 'set' . ucfirst($name);
        if (method_exists($this, $setMethod)) {
            $this->$setMethod($value);
        } else {
            throw new \InvalidArgumentException(sprintf('Setter does not exist for "%s" property', $name));
        }
        return $this;
    }
1364346
public function offsetSet($offset, $value)
    {
        $method = 'set' . ucfirst($offset);
        if (method_exists($this, $method)) {
            $this->{$method}($value);
        } else {
            $method = 'set' . self::matchPropertyName($offset);
            if (method_exists($this, $method)) {
                $this->{$method}($value);
            } else {
                $this->unknownProperties[$offset] = $value;
            }
        }
    }