Set the IO object
@param GoracashIO $ioObject
426037
public function setIo(GoracashIO $ioObject)
    {
        $this->config->setIoClass(get_class($ioObject));
        $this->io = $ioObject;
    }
266503
public static function set($object, $key = null) {
        if (!is_object($object)) {
            throw new InvalidObjectException('The object to register must be instantiated');
        }

        if (!$key) {
            $key = get_class($object);
        }

        static::$_registered[$key] = $object;

        return $object;
    }
988789
public function persist(LdapObject $ldapObject)
    {
        if (empty($ldapObject->getBatchCollection()->toArray())) {
            return;
        }
        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_BEFORE_MODIFY, $ldapObject));

        $this->validateObject($ldapObject);
        $this->executeBatchOperation($ldapObject);

        $this->dispatcher->dispatch(new LdapObjectEvent(Event::LDAP_OBJECT_AFTER_MODIFY, $ldapObject));
    }
256538
protected function setValue($object, $property, $value)
    {
        $reflectionClass = new ReflectionClass($object);

        if (!$reflectionClass->hasProperty($property)) {
            $object->{$property} = $value;

            return;
        }

        $reflectionProperty = $reflectionClass->getProperty($property);
        $reflectionProperty->setAccessible(true);

        $reflectionProperty->setValue($object, $value);
    }
1119495
public void writeObject(Object object)
        throws IOException
    {
        if (object == null) {
            writeNull();
            return;
        }

        Serializer serializer;

        serializer = _serializerFactory.getSerializer(object.getClass());

        serializer.writeObject(object, this);
    }
220469
public void registerUserObject(final Object iObject, final ORecordInternal<?> iRecord) {
		if (!(iRecord instanceof ODocument))
			return;

		final ODocument doc = (ODocument) iRecord;

		if (retainObjects) {
			if (iObject != null) {
				objects2Records.put(iObject, doc);
				records2Objects.put(doc, (T) iObject);

				OObjectSerializerHelper.setObjectID(iRecord.getIdentity(), iObject);
				OObjectSerializerHelper.setObjectVersion(iRecord.getVersion(), iObject);
			}

			final ORID rid = iRecord.getIdentity();
			if (rid.isValid())
				rid2Records.put(rid, doc);
		}
	}
817285
public static function fromDomainObject($domainObject)
    {
        if (!is_object($domainObject)) {
            throw new InvalidDomainObjectException('$domainObject must be an object.');
        }

        try {
            if ($domainObject instanceof DomainObjectInterface) {
                return new self($domainObject->getObjectIdentifier(), ClassUtils::getRealClass($domainObject));
            } elseif (method_exists($domainObject, 'getId')) {
                return new self((string) $domainObject->getId(), ClassUtils::getRealClass($domainObject));
            }
        } catch (\InvalidArgumentException $e) {
            throw new InvalidDomainObjectException($e->getMessage(), 0, $e);
        }

        throw new InvalidDomainObjectException('$domainObject must either implement the DomainObjectInterface, or have a method named "getId".');
    }
493552
public function setObject($object)
    {
        if ( ! is_object($object))
        {
            throw new InvalidArgumentException(
                'Expected an object, but got '.gettype($object)
            );
        }

        $this->object = new ReflectionClass($object);
    }
166702
public function offsetSet($object, $data = null)
       {
            if (! parent::contains($object)) {
                parent::attach($object, $data);
                $this->map[$this->index++] = spl_object_hash($object);
                while(parent::valid()) {
                    parent::next();
                }
            }
       }
531858
public function offsetSet($offset, $object)
	{
		if (!($object instanceof DataObject))
		{
			throw new \InvalidArgumentException(sprintf('%s("%s", *%s*)', __METHOD__, $offset, \gettype($object)));
		}

		// Set the offset.
		$this->objects[$offset] = $object;
	}
1048445
public void set(String name, Object obj) throws IOException {
        if (obj instanceof Extension) {
            map.put(name, (Extension)obj);
        } else {
            throw new IOException("Unknown extension type.");
        }
    }
123531
protected function setIo(InputInterface $input, OutputInterface $output)
    {
        $this->input = $input;
        $this->output = $output;

        return $this;
    }
747864
public function addIO($io): void
    {
        if (!$io instanceof AbstractInput && !$io instanceof AbstractOutput) {
            throw new \InvalidArgumentException('io must be an instance of '.AbstractInput::class.' or '.AbstractOutput::class.' but '.\get_class($io).' instead !');
        }

        $this->aggregate->add($io);
    }
480904
public function setInstance($object, $abstract = null)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object');
        }
        if ($abstract === null) {
            //If $abstract is not specified, use $objects class
            $abstract = get_class($object);
        } elseif ($abstract[0] === '\\') {
            //Strip all leading backslashes
            $abstract = substr($abstract, 1);
        }
        $concrete = $this->findMostConcreteDefinition($abstract);
        if (isset($this->objects[$concrete])) {
            //If this class already has an instance, we'll return the old object
            $old = $this->objects[$concrete];
        } else {
            $old = false;
        }
        //Store the object
        $this->objects[$concrete] = $object;

        return $old;
    }
257264
public function setInstance($classOrAlias,$object){
		$this->getClassLoaderService()->setInstance($classOrAlias,$object,$this->getNamespace());
	}
910700
public function add($oObject)
    {
        if ($oObject->getId()) {
            $this->_aArray[$oObject->getId()] = $oObject;
        } else {
            $this->_aArray[] = $oObject;
        }
    }
1050165
public static function setValuesToObject($object, $values = null) {
		if (! isset ( $values ))
			$values = $_POST;
		foreach ( $values as $key => $value ) {
			$accessor = "set" . ucfirst ( $key );
			if (method_exists ( $object, $accessor )) {
				$object->$accessor ( $value );
				$object->_rest [$key] = $value;
			}
		}
	}