Adds the attribute

@param _name
the attribute name
@param _value
the attribute name
325265
public void addAttribute(final String _name, final String _value) {
        this.attributes.put(_name, new XmlNode() {
            {
                this.name = _name;
                this.value = _value;
                this.valid = true;
                this.type = XmlNode.ATTRIBUTE_NODE;
            }
        });
    }
342494
public function setAttribute(string $name, $value): void
	{
		Arr::set($this->attributes, $name, $value);
	}
1205299
public boolean add(String name, Object value)
    {
        if(name == null)
            throw new NullPointerException("name == null");
        add(name);
        add(value.toString());
        return true;
    }
176694
protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
71709
public void setAttribute(String name, Object value) {
		this.webSocketSession.getAttributes().put(name, value);
	}
491752
public void set(String name, Object value) {
        hashAttributes.put(name, value);

        if (plugin != null) {
            plugin.invalidate();
        }
    }
581856
def add(self, name, attr=None, value=None):
        ""

        if isinstance(name, tuple) or isinstance(name, list):
            name, attr, value = self.__set_iter_value(name)

        if attr is None:
            attr = name

        if value is None:
            value = attr

        self.__data += (self.get_const_string(name=name, value=value),)
        # set attribute as slugfiy
        self.__dict__[s_attr(attr)] = self.__data[-1]
30898
def value_attr(attr_name):
    

    def value_attr(value, context, **_params):
        value = getattr(value, attr_name)
        return _attr(value)

    return value_attr
893195
public void add(final String name, final String value) {
    ArrayList<String> values = super.get(name);
    if (values == null) {
      values = new ArrayList<String>(1);  // Often there's only 1 value.
      super.put(name, values);
    }
    values.add(value);
  }
133566
public function setAttrData(string $name, ?string $value): void
  {
    $this->attributes['data-'.$name] = $value;
  }
1289505
public void addAttribute(String name, String value) {
        checkType(name, String.class);
        attributes.put(name, value);
    }
1139881
function(name, value) {
			if (arguments.length == 2) {
				if (value === null) {
					// remove attribute
					var vals = this._attributes.filter(function(attr) {
						return attr.name === name;
					});

					var that = this;
					vals.forEach(function(attr) {
						var ix = that._attributes.indexOf(attr);
						if (~ix) {
							that._attributes.splice(ix, 1);
						}
					});

					return;
				}

				// modify attribute
				var attrNames = this._attributes.map(function(attr) {
					return attr.name;
				});
				var ix = attrNames.indexOf(name.toLowerCase());
				if (~ix) {
					this._attributes[ix].value = value;
				} else {
					this._attributes.push({
						name: name,
						value: value
					});
				}
			}
			
			return (utils.find(this.attributeList(), function(attr) {
				return attr.name == name;
			}) || {}).value;
		}
1222107
def write_attribute(name, value)
      name = name.to_s

      if respond_to?("#{name}=")
        __send__("attribute=", name, value)
      else
        raise ::ActiveRemote::UnknownAttributeError, "unknown attribute: #{name}"
      end
    end
635191
def _add_attribute(self, name, value, allowed_values=None):
        """"""
        if value and value != 'none':

            if isinstance(value, (int, bool)):
                value = str(value)

            if allowed_values and value not in allowed_values:
                raise TypeError(
                    "Attribute '" + name + "' must be one of " + str(
                        allowed_values) + " but is '" + str(value) + "'")

            self.element_attrs[name] = value
275768
public function add($name, $value)
    {
        Assert::string($name, 'The attribute name must be a string. Got: %s');
        Assert::notEmpty($name, 'The attribute name must not be empty.');
        Assert::startsWithLetter($name, 'The attribute name %s must start with a letter.');
        Assert::true((bool) preg_match('~^[a-zA-Z][a-zA-Z0-9\-]*$~', $name), sprintf(
            'The attribute name must contain letters, numbers and hyphens only. Got: "%s"',
            $name
        ));
        Assert::string($value, 'The attribute value must be a string. Got: %s');

        $this->attributes[$name] = $value;
    }
412154
public void addParam(String name, String value) {
        getParams().add(new BasicNameValuePair(name, value));
    }
1231351
public void setAttribute(String name, String value)
	{
		if (value != null)
			getElement().setAttribute(name, value);
		else
			getElement().removeAttribute(name);
	}