Set a single property or multiple properties at once

@param string|array $index
@param mixed $value
551701
public function set($index, $value = null)
    {
        if (is_array($index)) {
            $this->data = array_merge($this->data, $index);
        } else {
            $this->data[$index] = $value;
        }
        return $this;
    }
58470
public function offsetSet($index, $newval)
    {
        if ($index === null) {
            $this[] = $newval;
        } else {
            parent::offsetSet($index, $newval);
        }
    }
321823
public void setValueAt( int index, double value ) {

        int row = index / data[0].length;
        int col = index % data[0].length;

        data[row][col] = value;
    }
690008
public void set(int index, SoyData value) {
    if (index == list.size()) {
      list.add(ensureValidValue(value));
    } else {
      list.set(index, ensureValidValue(value));
    }
  }
424410
public function addArg($value, $index = null) {
        if ($index !== null) {
            $this->args[$index] = $value;
        } else {
            $this->args[] = $value;
        }
        return $this;
    }
753443
public function offsetSet($offset, $value): void
    {
        $index = $this->getSize();

        // change size.
        if ($index <= \count($this->keys)) {
            $this->values->setSize($index + 10);
        }

        $this->values[$index] = $value;
        $this->keys[$offset] = $index;
    }
1057911
public void set(int index, int count, boolean value)
    {
        for (int ii=0;ii<count;ii++)
        {
            set(ii+index, value);
        }
    }
1095969
public static function set(string $index, $value)
    {
        Base::checkOpen();
        Base::getSessionObject()->set($index, $value);
    }
282597
public function setIndexKey($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->IndexKey = $value;
    }
769349
public function offsetSet($index, $value) {
		if( is_null($index) ){
			$this->results[] = $value;
			return;
		}
		$this->results[$index] = $value;
	}
376441
@SuppressWarnings({"unchecked", "SuspiciousSystemArraycopy"})
    private static void setIndexedValue(Object obj, Property property, int index, Object value, ObjectWrapper options) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot set a new indexed value to a 'null' property.");
        }

        Object propertyValue = property.get(obj);

        if (propertyValue == null) {
            if (options.isAutoInstancing) {
                Class<?> propertyType = property.getType();

                if (propertyType.isAssignableFrom(List.class)) {
                    propertyValue = new ArrayList();
                    property.set(obj, propertyValue);
                } else if (propertyType.isArray()) {
                    propertyValue = Array.newInstance(property.getActualType(), index + 1);
                    property.set(obj, propertyValue);
                } else {
                    throw new IllegalArgumentException("The indexed " + property + " in object "
                                                               + obj.getClass().getSimpleName() + " has value 'null'. Only List and array types can be " +
                                                               "auto instantiated, but " + propertyType.getSimpleName() + " found.");
                }
            } else {
                throw new NullPointerException("Invalid 'null' value found for the indexed '" + property + "' in "
                                                       + obj.getClass().getName() + " object.");
            }
        }

        if (propertyValue instanceof List) {
            List list = (List) propertyValue;
            int size = list.size();

            if (index >= size && options.isAutoGrowing) {
                for (int i = size; i < index; i++) {
                    try {
                        list.add(null);
                    } catch (NullPointerException ex) {
                        throw new NullPointerException("The indexed " + property + " has size lower than the requested '"
                                                               + index + "' index. An attempt to autogrowing it, filling with 'null' values, was made, " +
                                                               " but the List implementation seems to do not accept 'null' values. " + ex.getMessage());
                    }
                }

                list.add(index, value);
            } else {
                try {
                    list.set(index, value);
                } catch (IndexOutOfBoundsException e) {
                    throw new IndexOutOfBoundsException("Cannot set a new value to the indexed list " + property + " in "
                                                                + obj.getClass().getSimpleName() + " as the requested '" + index + "' index is unbound.");
                }
            }
        } else if (propertyValue.getClass().isArray()) {
            int length = Array.getLength(propertyValue);

            if (index >= length && options.isAutoGrowing) {
                Object biggerArray = Array.newInstance(property.getActualType(), index + 1);
                System.arraycopy(propertyValue, 0, biggerArray, 0, length);
                property.set(obj, biggerArray);
                propertyValue = biggerArray;
            }

            try {
                Array.set(propertyValue, index, value);
            } catch (ArrayIndexOutOfBoundsException e) {
                throw new IndexOutOfBoundsException("Cannot set a new value to the indexed array " + property
                                                            + " in " + obj.getClass().getSimpleName() + " as the requested '" + index + "' index is unbound.");
            }
        } else {
            throw new IllegalArgumentException("Cannot set a new value to a not indexed " + property + ". Only List and array " +
                                                       "types are supported, but " + propertyValue.getClass().getName() + " found.");
        }
    }
143235
public function offsetSet($offset, $value)
	{
		list($index_name, $key) = $this->normalizeAccessKey($offset);

		$this->set($key, $value, $index_name);
	}
565473
public static void set(final int[][] array, final long index, int value)
    {
        array[segment(index)][displacement(index)] = value;
    }
232908
public function setField(Field $field, $index = 0)
    {
        $this->field = $field;
        $this->valueIndex = $index;
    }
589594
public function setValue($name, $value = '')
    {
        if (\is_array($name)) {
            foreach ($name as $key => $val) {
                if (isset($this->$key)) {
                    $this->$key = $val;
                }
            }
        } else {
            if (isset($this->$name)) {
                $this->$name = $value;
            }
        }
    }
795585
public function update(int $index, $value): bool
    {
        return $this->handle->lSet($this->name, $index, $value);
    }
307509
public function set($index, $value)
    {
        if($index >= $this->count())
            throw new OutOfRangeException('Index out of range');

        $this->_collection[$index] = $value;
    }