Set the object you want to work with.

@throws InvalidArgumentException
@param mixed $object
@return void
493552
public function setObject($object)
    {
        if ( ! is_object($object))
        {
            throw new InvalidArgumentException(
                'Expected an object, but got '.gettype($object)
            );
        }

        $this->object = new ReflectionClass($object);
    }
389761
public function setSubject($value)
    {
        if (trim($value) == null)
        {
            throw new InvalidArgumentException("Subject cannot be empty.");
        }
        $this->subject = trim($value);
    }
1198671
public function registerInstance($object)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('registerInstance(): Cannot pass primitive types, can only register an object instance; use registerVariable() instead');
        }

        $reflectionObject = new \ReflectionObject($object);
        $className = $reflectionObject->getName();

        // Register strong link in $instance
        $this->instances[$className] = $object;

        // Recursively determine and register weak links
        $determineParent = function (\ReflectionClass $class) use ($className, &$determineParent) {
            $parentClass = $class->getParentClass();

            if (!empty($parentClass)) {
                $this->weakLinks[$parentClass->getName()] = $className;
                $determineParent($parentClass);
            }
        };

        $determineParent($reflectionObject);
    }
1351738
public function setObjects(array $objects)
    {
        foreach ($objects as $object) {
            $this->checkType(ObjectDataInterface::class, $object);
        }

        $this->objects = $objects;
    }
568283
public static function configure($object, array $options): void
    {
        foreach ($options as $property => $value) {
            if (\property_exists($object, $property)) {
                $object->$property = $value;
            }
        }
    }
869021
public static function reset($object)
	{
		if (!($object instanceof CodeGeneratorResponse)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\Compiler\CodeGeneratorResponse.');
		}
		$object->error = NULL;
		$object->file = NULL;
	}
991235
public static function reset($object)
	{
		if (!($object instanceof ServiceOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\ServiceOptions.');
		}
		$object->deprecated = NULL;
		$object->uninterpretedOption = NULL;
	}
1192585
protected function resetObject(&$object)
    {
        $class = new \ReflectionClass($this->className);
        $properties = $class->getDefaultProperties();

        foreach ($properties as $propName => $property) {
            if (is_string($property) && class_exists($property)) {
                $object->with(null, $propName);
            }
        }
    }
106588
public function setParent($object) {
		
		if (! is_object($object)) {
			throw new \InvalidArgumentException("Expecting object, given: ".gettype($object));
		}
		
		$this->parent = $object;
		return $this;
	}
989879
public static function reset($object)
	{
		if (!($object instanceof FileOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FileOptions.');
		}
		$object->javaPackage = NULL;
		$object->javaOuterClassname = NULL;
		$object->javaMultipleFiles = NULL;
		$object->javaGenerateEqualsAndHash = NULL;
		$object->javaStringCheckUtf8 = NULL;
		$object->optimizeFor = NULL;
		$object->goPackage = NULL;
		$object->ccGenericServices = NULL;
		$object->javaGenericServices = NULL;
		$object->pyGenericServices = NULL;
		$object->deprecated = NULL;
		$object->ccEnableArenas = NULL;
		$object->objcClassPrefix = NULL;
		$object->csharpNamespace = NULL;
		$object->javananoUseDeprecatedPackage = NULL;
		$object->uninterpretedOption = NULL;
	}
406668
public static function reset($object)
	{
		if (!($object instanceof FieldOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FieldOptions.');
		}
		$object->ctype = NULL;
		$object->packed = NULL;
		$object->jstype = NULL;
		$object->lazy = NULL;
		$object->deprecated = NULL;
		$object->weak = NULL;
		$object->uninterpretedOption = NULL;
	}
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;
			}
		}
	}
491614
public function set($object, $key, $value)
    {
        $object->set($this->local, $value->{$this->foreign});
    }
1361401
public function offsetSet($object, $value) : void
    {
        $hash = spl_object_hash($object);

        $this->objects[$hash] = $object;
        $this->data[$hash] = $value;
    }
933183
protected function setProperty($object, $name = null)
    {
        if ($name === null) {
            $this->params[] = $object;
        } else {
            $this->params[$name] = $object;
        }
        return $this->make();
    }
807652
public function offsetSet($offset, $object)
    {
        if (!$object instanceof ObjectHandlable) {
            throw new \InvalidArgumentException('Object needs to implement ObjectHandlable');
        }

        $this->__data[$object->getHandle()] = $object;
        return $this;
    }
664516
public function setContentObject($contentObject)
    {
        if (!is_object($contentObject)) {
            throw new \InvalidArgumentException('Argument must be an object, ' . \gettype($contentObject) . ' given.', 1283522467);
        }
        if ($this->contentObjectProxy === null || $this->contentObjectProxy->getObject() !== $contentObject) {
            $this->contentObjectProxy = new ContentObjectProxy($contentObject);
            $this->addOrUpdate();
        }
    }