Sets an array of attributes.
@param array $attributes An associative array [$name => $value].
185975
public function setAttributes($attributes) {
        $this->setVariable(self::ATTRIBUTES, "");
        foreach($attributes as $name => $value) {
            $this->addAttribute($name, $value);
        }
    }
849015
protected function setAttribute($name, $value)
    {
        if (!in_array($name, $this->availableAttributes)) {
            return;
        }

        if (is_numeric($value)) {
            $this->attributes[$name] = (int) $value;
        } else {
            $this->attributes[$name] = (string) $value;
        }
    }
972832
public function setAttributes(Array $attributes) {

		foreach($attributes as $k => $v) {
			$this->setAttribute($k, $v);
		}
		return $this;

	}
613624
public function setBadgeAttributes($attributes)
    {
        if (! is_array($attributes)) {
            $attributes = [$attributes];
        }

        $this->badge_attributes = $attributes;

        return $this;
    }
1006936
public function addAttributes(array $attributes): self
    {
        $this->attributes = array_unique(array_merge($this->attributes, $attributes));

        return $this;
    }
1315852
public function setAttrs($attrs)
	{
		if(is_array($attrs))
		{
			$this->data = $attrs;
		}
		foreach($this->attrsDefault as $key=>$value)
		{
			if(null===$this->get($key,null))
			{
				$this->set($key,$value);
			}
		}
	}
74884
protected function setUnfillableAttributes(array $attributes = [])
    {
        if ( ! empty( $attributes )) {
            $keysToFill = array_diff(array_keys($attributes), $this->fillable);
            foreach ($keysToFill as $key) {
                $this->setAttribute($key, $attributes[$key]);
            }
        }
    }
561154
public void setAttributes(ArrayList<Attribute> attributes)
  {
    if (_attributes != attributes) {
      _attributes.clear();
      _attributes.addAll(attributes);
    }
  }
1136295
public function setJugglable(array $attributes)
    {
        // Check that each of the types are indeed jugglable types
        foreach ($attributes as $attribute => $type) {
            $this->checkJuggleType($type);
        }

        // Set the juggle attributes
        $this->jugglable = $attributes;
    }
872496
public void setAttributes( final String... attributes )
    {
        this.attributes = attributes == null ? null : new HashSet<String>( Arrays.asList( attributes ) );
    }
451673
private function appendAttributes(array $attrs)
    {
        foreach ($attrs as $key => $value) {
            $this->appendAttribute($key, $value);
        }
    }
1092179
public function attributes($attributes)
    {
        if (is_array($this->attributes) and is_array($attributes)) {
            $attributes = array_merge($this->attributes, $attributes);
        }
        $this->attributes = $attributes;

        return $this;
    }
1213760
public function setAttributes($values)
    {
        if (!is_array($values)) {
            return;
        }
        foreach ($values as $name => $value) {
            $this->$name = $value;
        }
    }
838067
public function addAttributes($attributes)
	{
		$this->_attributes = array_unique(
			array_merge(
				$this->_attributes,
				array_keys($attributes)
			)
		);
	}
342494
public function setAttribute(string $name, $value): void
	{
		Arr::set($this->attributes, $name, $value);
	}
1086098
public function merge( array $attributes ) {
		foreach ( $attributes as $name => $value ) {
			$this->set_attribute( $name, $value );
		}

		return $this;
	}
613693
public void setAttributes(Map<String, ?> attributes) {
        if (attributes == null) {
            attributes = new HashMap<>();
        }

        this.attributes.clear();
        this.attributes.putAll(attributes);
    }