Set toptions to object

@param string $object
@param array|Traversable $options
483296
public static function setOptions($object, $options)
    {
        if (!is_array($options) || ($options instanceof \Traversable)) {
            throw new exception\InvalidArgumentException('$options must be an array or implement the Traversable interface.');
        }

        foreach ($options as $key => $value) {
            $method = 'set' . static::camelize($key);
            if (!is_callable(array($object, $method))) {
                continue;
            }

            $object->$method($value);
        }
    }
695447
public function set($key, $object) {
		
		if (! is_object($object)) {
			throw new \InvalidArgumentException("Registry only accepts objects, given: ".gettype($object));
		}
		
		$this->_data[$key] = $object;
		
		return $this;
	}
532958
public static function setPropertyValue($object,$propertyName,$value)
    {
        $setter = "set" . ucfirst($propertyName);
        if (method_exists($object, $setter)) {
            $object->$setter($value);
        }
    }
360347
public static function bindSet(array $data, $object)
    {
        if (!is_object($object)) {
            throw new RuntimeException(sprintf('"%s" is not object.', $object));
        }

        foreach ($data as $key => $value) {
            $method = CamelCaser::underScoresToCamelCase(sprintf('set_%s', $key));

            if (method_exists($object, $method)) {
                call_user_func_array(array($object, $method), array($value));
            } else {
                $method = CamelCaser::underScoresToCamelCase($key);

                if (!method_exists($object, $method)) {
                    $method = CamelCaser::underScoresToCamelCase(sprintf('is_%s', $key));
                }

                call_user_func_array(array($object, $method), array($value));
            }
        }

        return $object;
    }
698257
public static function reset($object)
	{
		if (!($object instanceof MethodDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\MethodDescriptorProto.');
		}
		$object->name = NULL;
		$object->inputType = NULL;
		$object->outputType = NULL;
		$object->options = NULL;
		$object->clientStreaming = NULL;
		$object->serverStreaming = NULL;
	}
850463
public function apiSerialize($object, $options = [])
    {
        if (!empty($object)) {
            return $this->serializerProvider->serialize($object, $options);
        }

        return $object;
    }
1034610
public function setOptions($options)
    {
        if (!is_array($options) && !$options instanceof Traversable) {
            throw new Exception\InvalidArgumentException(sprintf(
                '"%s" expects an array or Traversable; received "%s"',
                __METHOD__,
                (is_object($options) ? get_class($options) : gettype($options))
            ));
        }

        foreach ($options as $key => $value) {
            if ($key == 'options') {
                $key = 'adapterOptions';
            }
            $method = 'set' . ucfirst($key);
            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }
        return $this;
    }
85047
public static function init($object, array $options)
    {
        foreach ($options as $property => $value) {
            if (is_numeric($property)) {
                continue;
            }

            $setter = 'set' . ucfirst($property);

            // has setter
            if (method_exists($object, $setter)) {
                $object->$setter($value);
            } else {
                $object->$property = $value;
            }
        }

        return $object;
    }
102055
function setOptions( options ) {
		if ( !options.hasOwnProperty( 'objectMode' ) ) {
			options.objectMode = false;
		}
		if ( !options.hasOwnProperty( 'encoding' ) ) {
			options.encoding = null;
		}
	}
1031086
public function set($key, $object) {
        $this->_components[$key] = Registry::set($object);

        return $this;
    }
792026
public static function reset($object)
	{
		if (!($object instanceof FileDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FileDescriptorProto.');
		}
		$object->name = NULL;
		$object->package = NULL;
		$object->dependency = NULL;
		$object->publicDependency = NULL;
		$object->weakDependency = NULL;
		$object->messageType = NULL;
		$object->enumType = NULL;
		$object->service = NULL;
		$object->extension = NULL;
		$object->options = NULL;
		$object->sourceCodeInfo = NULL;
		$object->syntax = NULL;
	}
586891
public static function reset($object)
	{
		if (!($object instanceof EnumDescriptorProto)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumDescriptorProto.');
		}
		$object->name = NULL;
		$object->value = NULL;
		$object->options = NULL;
	}
680946
static function setProperties( ValueObjectInterface $object, array $values )
    {
        foreach ( $values as $property => $value )
        {
            $this->setProperty( $object, $property, $value );
        }
    }
905596
protected static function configObject($object, array $options)
    {
        $options = self::checkOptions($options);
        foreach ($options as $name => $value) {
            $methodName = 'set' . ucfirst($name);
            if (!method_exists($object, $methodName)) {
                continue;
            }
            $object->$methodName($value);
        }

        return $object;
    }
1121031
function( options ){
      var obj = options.map;
      var key;
      var keys = options.keys;
      var l = keys.length;

      for(var i = 0; i < l; i++){
        var key = keys[i];

        if( $$.is.plainObject( key ) ){
          $$.util.error('Tried to set map with object key');
        }

        if( i < keys.length - 1 ){
          
          // extend the map if necessary
          if( obj[key] == null ){
            obj[key] = {};
          }
          
          obj = obj[key];
        } else {
          // set the value
          obj[key] = options.value;
        }
      }
    }
1080522
public function set($object = null)
    {
        if (null !== $object && !$object instanceof Language) {
            throw new General\InvalidArgumentTypeException('exception_only_language_objects_are_accepted');
        }

        $this->alLanguage = $object;

        return $this;
    }
825537
public static function delete($object)
    {
        if (null === $object) {
            throw new \LogicException("No object");
        }

        $setterDelete = [
            $object,
            "setDeleted"
        ];

        if (false === is_callable($setterDelete)) {
            throw new \LogicException(sprintf("%s is not softdeletable", get_class($object)));
        }

        $object->setDeleted(true);

        $oReflectionClass = new \ReflectionClass($object);
        foreach ($oReflectionClass->getProperties() as $property) {
            $property->setAccessible(true);
            $propertyValue = $property->getValue($object);

            if ($propertyValue instanceof Collection || true === is_array($propertyValue)) {
                foreach ($propertyValue as $propertyValueRelation) {
                    $setterDelete = [
                        $propertyValueRelation,
                        "setDeleted"
                    ];

                    if (true === is_callable($setterDelete)) {
                        $propertyValueRelation->setDeleted(true);
                    }
                }
            }
        }
    }