Appends a single attribute given by key and value to this writer's
output.

@param string $attrName  The attribute name.
@param string $attrValue The attribute value.

@return void
17349
private function appendAttribute($attrName, $attrValue)
    {
        $xml1 = defined('ENT_XML1') ? ENT_XML1 : 16;

        $attrName = htmlspecialchars($attrName, $xml1 | ENT_COMPAT);
        $attrValue = htmlspecialchars($attrValue, $xml1 | ENT_COMPAT);

        $this->outString .= ' '.$attrName.'="'.$attrValue.'"';
    }
664931
public void addDataElement(String elemName, String content, String attrName, String attrValue) {
        AttributesImpl attrs = new AttributesImpl();
        attrs.addAttribute("", attrName, "", "CDATA", attrValue);
        writeDataElement(elemName, attrs, content);
    }
414319
protected function addAttribute(Tag $tag, $attrName)
	{
		$isUrl = false;
		$exprs = [];
		foreach ($this->captures as $key => $capture)
		{
			if ($capture['name'] !== $attrName)
			{
				continue;
			}
			$exprs[] = $capture['expr'];
			if (isset($this->references['asUrl'][$key]))
			{
				$isUrl = true;
			}
		}
		$exprs = array_unique($exprs);

		$regexp = $this->delimiter . '^';
		$regexp .= (count($exprs) === 1) ? $exprs[0] : '(?:' . implode('|', $exprs) . ')';
		$regexp .= '$' . $this->delimiter . 'D' . $this->modifiers;

		$attribute = $tag->attributes->add($attrName);

		$filter = $this->configurator->attributeFilters['#regexp'];
		$filter->setRegexp($regexp);
		$attribute->filterChain[] = $filter;

		if ($isUrl)
		{
			$filter = $this->configurator->attributeFilters['#url'];
			$attribute->filterChain[] = $filter;
		}
	}
928757
public void setAttributeValue(final AttributeValue attrval) {
	this.attrval.value = attrval.value;
	this.attrval.name = attrval.name;
	this.attrval.quality = attrval.quality;
	this.attrval.time = attrval.time;
	this.attrval.r_dim.dim_x = attrval.dim_x;
	this.attrval.r_dim.dim_y = attrval.dim_y;
	this.attrval.w_dim.dim_x = 0;
	this.attrval.w_dim.dim_y = 0;
	this.attrval.err_list = null;
    }
501335
public function prepare(&$attrs)
    {
        $attrs['type'] = $this->type ?: 'text';
        $attrs['name'] = $this->getFieldName();
        $attrs['id'] = $this->getAttribute('id', $this->getId());
        $attrs['class'] = $this->getAttribute('class');
        $attrs['placeholder'] = $this->getAttribute('placeholder');
        $attrs['size'] = $this->getAttribute('size');
        $attrs['maxlength'] = $this->getAttribute('maxlength');
        $attrs['readonly'] = $this->getAttribute('readonly');
        $attrs['disabled'] = $this->getAttribute('disabled');
        $attrs['autofocus'] = $this->getAttribute('autofocus');
        $attrs['autocomplete'] = $this->getAttribute('autocomplete');
        $attrs['form'] = $this->getAttribute('form');
        $attrs['formenctype'] = $this->getAttribute('formenctype');
        $attrs['formmethod'] = $this->getAttribute('formmethod');
        $attrs['formnovalidate'] = $this->getAttribute('formnovalidate');
        $attrs['formtarget'] = $this->getAttribute('formtarget');
        $attrs['onchange'] = $this->getAttribute('onchange');
        $attrs['onfocus'] = $this->getAttribute('onfocus');
        $attrs['onblur'] = $this->getAttribute('onblur');
        $attrs['value'] = $this->escape($this->getValue());
        $attrs['list'] = $this->getAttribute('list', count($this->options) ? $this->getId() . '-list' : null);

        $attrs['required'] = $this->required;
    }
325599
public function setAttribute($strKey, $mixValue)
    {
        if ($mixValue === true)
            $mixValue = $strKey;
        else if ($mixValue === false)
            $mixValue = '';

        $this->arrAttributes[$strKey] = $mixValue;
    }
769183
private void setAttrValue(final AttrName _attrName,
                              final String _value)
    {
        synchronized (this.attrValues) {
            this.attrValues.put(_attrName, _value);
        }
    }
284432
public function addAttribute($attribute, $value)
    {
        $this->attributes[$attribute] = (string) $value;
        $this->eventHandler->attributeAdded($this, $attribute, $value);
    }
605366
public void setAttribute(ObjectName name, String attrName, String value) throws Exception {
		MBeanAttributeInfo info = getAttrInfo(name, attrName);
		if (info == null) {
			throw new IllegalArgumentException("Cannot find attribute named '" + attrName + "'");
		} else {
			setAttribute(name, attrName, ClientUtils.stringToParam(value, info.getType()));
		}
	}
435921
public void insertAttributeValueString(String attributeName, String value, int index) {

        m_entity.insertAttributeValue(attributeName, value, index);
    }
857502
private static void addAttribute(final AttributesImpl attributes, final String attrName, final String attrValue) {
    if (attrName == null) {
      throw new IllegalArgumentException("attrName");
    }
    if (attrValue != null) {
      attributes.addAttribute(null, attrName, attrName, "#PCDATA", attrValue);
    }
  }
877664
public function set_attr( $attribute, $value = null ) {
		if ( is_null( $value ) || $value === false ) {
			if ( array_key_exists( $attribute, $this->attr ) ) {
				unset( $this->attr[$attribute] );
			}
		} else {
			if ( $value === true ) {
				$value = $attribute;
			}
			$this->attr[ $attribute ] = $value;
		}
		
		return $this;
	}
406038
public function addAttr($attr, $val)
    {
        if (is_string($attr) === false) {
            throw new \InvalidArgumentException;
        }

        $this->attributes[$attr] = $val;

        return $this;
    }
1337708
function (attributeName, attributeValue) {
        var attributeArray;
        if (this._definitionAttributes) {
            attributeArray = this._definitionAttributes[attributeName];
        } else {
            this._definitionAttributes = {};
        }
        if (undefined === attributeArray) {
            attributeArray = [];
        }
        this._definitionAttributes[attributeName] = attributeArray.concat(attributeValue);
    }
1295024
public void addAttr(HtmlAttr attrName, String attrValue) {
        if (attrs.isEmpty())
            attrs = new LinkedHashMap<HtmlAttr,String>(3);
        attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue));
    }
1066892
public function attribute( string $attr, string $value ): Tag
    {
        $this->attributes[$attr] = $value;

        return $this;
    }
671605
public function addElement($attrs)
    {
        if (!$this->getPrefix($attrs['type'])) {
            $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
        }
        $this->elements[$attrs['name']] = $attrs;
        $this->elements[$attrs['name']]['typeClass'] = 'element';

        $this->xdebug("addElement " . $attrs['name']);
        $this->appendDebug($this->varDump($this->elements[$attrs['name']]));
    }