Set an HTML tag attribute

@param string $name
@param string $value

@return self|$this|ElementInterface
551840
public function setAttribute($name, $value = null)
    {
        $this->getAttributes()->set($name, $value);
        return $this;
    }
70539
public function setAttribute($node, $name, $value)
    {
        if (is_string($node)) {
            $node = $this->getNode($node);
        }

        if ($node) {
            $node->setAttribute($name, $value);
        }
    }
1200734
public static function tag( $name, $attributes = array(), $value = null, $close = true, $selfClose = false )
    {
        //	Nah nah...
        if ( true !== $close )
        {
            $close = $selfClose = false;
        }

        $_html = static::openTag( $name, $attributes, $selfClose );

        if ( false !== $selfClose )
        {
            return $_html;
        }

        if ( null !== $value )
        {
            $_html .= trim( $value );
        }

        if ( $close )
        {
            $_html .= static::closeTag( $name );
        }

        return trim( $_html );
    }
1256152
public function setAttribute($name, $value)
    {
        foreach ($this as $node) {
            if ($node instanceof \DOMElement) {
                /** @var \DOMElement $node */
                $node->setAttribute($name, $value);
            }
        }
        return $this;
    }
581218
final public function set(string $name, $value)
    {
        $this->container->setParameter($name, static::processValue($value, true));

        return $this;
    }
1338473
public function setAttrAria(string $name, ?string $value): void
  {
    $this->attributes['aria-'.$name] = $value;
  }
249521
public function setAttribute(string $name, string $value) : Form
    {
        $this->getTag()->setAttribute($name, $value);

        return $this;
    }
185520
public function set($name, $value)
    {
        $name = '_' . (string)$name;
        if (property_exists($this, $name) && (!is_array($this->$name))) {
            $this->$name = $value;
        }
        return $this;
    }
441162
public function setNameAttribute(string $value)
    {
        $displayer = config('tagging.displayer');
        $displayer = empty($displayer) ? '\Illuminate\Support\Str::title' : $displayer;

        $this->attributes['name'] = call_user_func($displayer, $value);
    }
520794
protected function set($name, $value)
    {
        if ($this->modified === null && $this->uid !== null) {
            $this->load();
        }

        $value = $this->validate($name, $value);

        if ($this->properties[$name]['value'] !== $value) {
            $this->properties[$name]['value'] = $value;
            $this->modified = true;
        }

        return $this;
    }
883564
final protected function setAttribute($name, $value)
    {
        if ($value !== null && $this->hasAttributeValueFactory($name)) {
            $this->internalCache[$name] = $this->createAttributeValue($name, $value);

            if ($this->internalCache[$name] instanceof JsonSerializable) {
                $value = $this->internalCache[$name]->jsonSerialize();
            } elseif (is_array($this->internalCache[$name])) {
                $value = array_map(
                    function ($value) {
                        if ($value instanceof JsonSerializable) {
                            $value = $value->jsonSerialize();
                        }

                        return $value;
                    },
                    $this->internalCache[$name]
                );
            } else {
                $value = $this->internalCache[$name];
            }
        }

        $this->data[$name] = $value;

        return $this;
    }
1106576
public function add($name, $value)
    {
        if ($this->has($name)) {
            $this->updateAttribute($name, $value);
        }
        else {
            $this->makeAttribute($name, $value);
        }

        return $this;
    }
560981
public function setAttribute($name, $value)
    {
        if ('q' === $name) {
            $this->quality = (float) $value;
        } else {
            $this->attributes[$name] = (string) $value;
        }

        return $this;
    }
82927
public function attribute(string $name, string $value) : Element
    {
        if (in_array($name, $this->reservedAttributes())) {
            throw new InvalidArgumentException("The attribute [$name] is reserved.");
        }

        $this->attributes[$name] = $value;

        return $this;
    }
875690
public function set(string $name, string $value)
    {
        $this->values[$name] = $value;
        return $this;
    }
284210
public function setAttribute(string $name, string $value) : Label
    {
        $this->tag->setAttribute($name, $value);

        return $this;
    }
815704
public function setOption($name, $value)
    {
        if ($name == 'tag_cache') {
            $this->setInnerCache($value);
        } else {
            parent::setOption($name, $value);
        }
        return $this;
    }