If the key is "value" and the $value an array, we assign all values to the children.

@param string $key
@param bool|int|string $value

@return CollectionElement
556916
public function withAttribute(string $key, $value): ElementInterface
    {
        if ($key === 'value' && is_array($value)) {
            foreach ($this->elements as $name => $element) {
                $this->elements[$name]->withValue($value[$name] ?? '');
            }

            return $this;
        }

        parent::withAttribute($key, $value);

        return $this;
    }
522903
function set($key, $value) {
        if(!$this->enabled) {
            return $this;
        }
        
        parent::set($key, $value);
        return $this;
    }
277863
public function set(string $key, string $value): HeaderCollection
    {
        return $this->setMultiple([$key => $value]);
    }
186944
public function set(string $key, $value)
  {
    $keys = \explode('.',$key);
    $arr = &$this->confValues;
    $arrParent = null;

    # Walk the structure
    foreach ($keys as $key) {
      $arrParent = &$arr;
      $lastKey = $key;
      if (!isset($arr[$key])) {
        $arr[$key]=[];
      }
      $arr = &$arr[$key];
    }

    if (\is_null($value)) {
      unset($arrParent[$lastKey]); // delete the key
    } else {
      $arr = $value; // set the value in the original confArray
    }

    return $this;
  }
639953
private function itemSet($value, $key = null)
    {
        if (is_null($key)) {
            $this->items[] = $value;
        } else {
            $this->items[$key] = $value;
        }
    }
714182
function set($key, $value) {
        if(!$this->enabled) {
            return $this;
        }
        
        parent::set($key, $value);
        if($this !== $this->client->presences) {
            $this->client->presences->set($key, $value);
        }
        
        return $this;
    }
345353
public function set(string $key, $value) : Container
    {
        $this->items[$key] = $value;

        return $this;
    }
444083
public function set(string $key, $value = null)
    {
        return Arr::set($this->items, $key, \value($value));
    }
151873
public function set($key, $value)
	{
		if ( ! $value instanceof Checkbox)
		{
			throw new \InvalidArgumentException('Only Checkboxs can be added to a CheckboxGroup');
		}

		return parent::set($key, $value);
	}
28867
public function withOption(string $key, $value): Element
    {
        $this->options[$key] = $value;

        return $this;
    }
892281
public function append($value, $key = null): Collection
    {
        $items = $this->items;

        if ($key === null) {
            $items[] = $value;
        } else {
            $items[$key] = $value;
        }

        return new static($items);
    }
913226
public function where($key, $value, bool $strict = true): ArrayCollection
    {
        return $this->filter(function ($item) use ($key, $value, $strict) {
            if (!isset($item[$key])) {
                return false;
            }

            return $strict ? $item[$key] === $value : $item[$key] == $value;
        });
    }
954963
public function set($key, $value)
    {
        $array = &$this->data;
        $keys = explode(self::SEPERATOR, $key);
        $i = 1;
        foreach ($keys as $item) {
            if (is_array($array) && array_key_exists($item, $array) && !is_array($array[$item]) && $i !== count($keys)) {
                return false;
            }
            $array = &$array[$item];
            $i++;
        }
        $array = $value;
        $this->save();
        return true;
    }
1324932
public function set($key, $value) : HashMap
    {
        $values = $this->_set($key, $value, false);
        $this->setValues($values);
        return $this;
    }
48314
public function set($key, $value = null)
    {
        $keys = is_array($key) ? $key : [$key => $value];

        foreach ($keys as $key => $value) {
            Arr::set($this->items, $key, $value);
        }
    }
618983
public function withValue($key, $value)
    {
        $copy = $this->values;
        $copy[$key] = $value;
        return new Context($copy);
    }
645229
public function getAll($key, $value = null)
    {
        $collection = new self();

        foreach ($this->items as $item) {
            if ($item->{$key} == $value) {
                $collection->push($item);
            }
        }

        return $collection;
    }