Resets properties of \Google\Protobuf\UninterpretedOption to default values


@param UninterpretedOption $object

@throws \InvalidArgumentException

@return void
558515
public static function reset($object)
	{
		if (!($object instanceof UninterpretedOption)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\UninterpretedOption.');
		}
		$object->name = NULL;
		$object->identifierValue = NULL;
		$object->positiveIntValue = NULL;
		$object->negativeIntValue = NULL;
		$object->doubleValue = NULL;
		$object->stringValue = NULL;
		$object->aggregateValue = NULL;
	}
976769
public static function configure($object, array $options)
    {
        foreach ($options as $property => $value) {
            $object->$property = $value;
        }
    }
101161
public static function reset($object)
	{
		if (!($object instanceof FieldDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FieldDescriptorProto.');
		}
		$object->name = NULL;
		$object->number = NULL;
		$object->label = NULL;
		$object->type = NULL;
		$object->typeName = NULL;
		$object->extendee = NULL;
		$object->defaultValue = NULL;
		$object->oneofIndex = NULL;
		$object->jsonName = NULL;
		$object->options = NULL;
	}
1267844
protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
788410
static public function setObjectProperties($object, array $config = [])
    {
        foreach (static::createSetterMethods($config) as $method => $value) {
            if (method_exists($object, $method)) {
                call_user_func_array([$object, $method], [$value]);
            }
        }
    }
97759
public function setOption($option)
    {
        if (!isset(static::$availableOptions[$option])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid option specified: "%s". Expected one of (%s)',
                $option,
                implode(', ', array_keys(static::$availableOptions))
            ));
        }
        if (!in_array(static::$availableOptions[$option], $this->options, true)) {
            $this->options[] = static::$availableOptions[$option];
        }
    }
538479
public function setObject($object)
    {
        if (!is_object($object)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects an object argument; received "%s"',
                __METHOD__,
                gettype($object)
            ));
        }

        if (property_exists($this, 'hydrator') && $this->hydrator) {
            $values = $this->getHydrator()->extract($object);
            foreach ($this->getFieldsets() as $name => $fieldset) {
                if (isset($values[$name]) && is_object($values[$name])) {
                    $fieldset->setObject($values[$name]);
                }
            }
        }

        if (property_exists($this, 'object')) {
            $this->object = $object;
        }

        return $this;
    }
722248
private function injectContext($object)
    {
        if ($object instanceof IContextAware) {
            if ($this->hasContext()) {
                $object->setContext($this->getContext());
            } else {
                $object->clearContext();
            }
        }
    }
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);
            }
        }
    }
568283
public static function configure($object, array $options): void
    {
        foreach ($options as $property => $value) {
            if (\property_exists($object, $property)) {
                $object->$property = $value;
            }
        }
    }
777356
protected function formatAble(&$object)
    {
        if (!is_object($object) || is_array($object)) {
            throw new InvalidArgumentException('The given argument is not an object/array.');
        }

        if (!is_object($object) && $object instanceof FormatAble) {
            return;
        }

        $object = new FormatAbleObject(clone($object));
    }
317799
public function offsetUnset($object)
       {
            if (parent::contains($object)) {
                parent::offsetUnset($object);
                $index = array_search(spl_object_hash($object), $this->map, true);
                unset($this->map[$index]);
            }
       }
713476
public static function reset($object)
	{
		if (!($object instanceof EnumValueDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumValueDescriptorProto.');
		}
		$object->name = NULL;
		$object->number = NULL;
		$object->options = NULL;
	}
570888
public function setOptions ($options = array())
	{
		// make sure we've got an array for $this->options (could be null)
		if (!is_array($this->options))
		{
			$this->options = array();
		}
		
		// make sure we've gotten a proper argument
		if (!is_array($options))
		{
			throw new InvalidArgumentException ('setOptions requires an array');
		}
		
		// we've yet to init the default options, so create them here
		if (sizeof($this->options) == 0)
		{
			$defaultOptions = array 
			(
				'resizeUp'				=> false,
				'jpegQuality'			=> 100,
				'correctPermissions'	=> false,
				'preserveAlpha'			=> true,
				'alphaMaskColor'		=> array (255, 255, 255),
				'preserveTransparency'	=> true,
				'transparencyMaskColor'	=> array (0, 0, 0)
			);
		}
		// otherwise, let's use what we've got already
		else
		{
			$defaultOptions = $this->options;
		}
		
		$this->options = array_merge($defaultOptions, $options);
	}
493552
public function setObject($object)
    {
        if ( ! is_object($object))
        {
            throw new InvalidArgumentException(
                'Expected an object, but got '.gettype($object)
            );
        }

        $this->object = new ReflectionClass($object);
    }
760144
protected function validate($object): void
    {
        $needType = $this->type();

        if (!$object instanceof $needType) {
            throw new \InvalidArgumentException("Element " . get_class($object) . " must be instance of " . $needType);
        }
    }
1264971
public static function reset($object)
	{
		if (!($object instanceof MessageOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\MessageOptions.');
		}
		$object->messageSetWireFormat = NULL;
		$object->noStandardDescriptorAccessor = NULL;
		$object->deprecated = NULL;
		$object->mapEntry = NULL;
		$object->uninterpretedOption = NULL;
	}