/* [attr*=value]
175421
function containsString(query, node) {
  var value = node[query.name]
  return typeof value === 'string' && value.indexOf(query.value) !== -1
}
753619
public function setStyleAttributeValue($attr_key, $attr_value): void
    {

        $style_array = $this->getStyleAttributeArray();
        $style_array[$attr_key] = $attr_value;

        $style_string = '';
        foreach ($style_array as $key => $value) {
            $style_string .= $key . ':' . $value . ';';
        }

        $this->setAttribute('style', $style_string);
    }
567464
function(el, attr, val) {
            Y.Dom.batch(el, Y.Dom._setAttribute, { attr: attr, val: val });
        }
996443
function(attr, val) {
      return val === undefined ? (this.length ? this[0].getAttribute(attr) : null) : this.each(function(index, el) {
        el.setAttribute(attr, val);
      });
    }
430852
public function attr($name, $value = null)
    {
        $attrs = (array) $this->getAttribute('attribs');

        if ($value === null) {
            return isset($attrs[$name]) ? $attrs[$name] : null;
        }

        $attrs[$name] = $value;

        $this->setAttribute('attribs', $attrs);

        return $this;
    }
551969
function Attr(model, value, mutator) {
        var _this = _super.call(this, model, value, mutator) /* istanbul ignore next */ || this;
        _this.value = value;
        return _this;
    }
1171251
function(attr) {
        var el = this.getEl();
        var val = Y.Dom.getStyle(el, attr);

        if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) {
            return parseFloat(val);
        }
        
        var a = this.patterns.offsetAttribute.exec(attr) || [];
        var pos = !!( a[3] ); // top or left
        var box = !!( a[2] ); // width or height
        
        if ('style' in el) {
            // use offsets for width/height and abs pos top/left
            if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
                val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
            } else { // default to zero for other 'auto'
                val = 0;
            }
        } else if (attr in el) {
            val = el[attr];
        }

        return val;
    }
213891
function(attr) {
      var startIndex, newAttr,
        i = 0,
        hasEndBracket = true;
      startIndex = attr.indexOf('[', i);
      if (startIndex < 0) {
        return attr;
      }
      newAttr = attr.substring(0, startIndex + 1);
      while (startIndex > 0 && hasEndBracket) {
         i = attr.indexOf(']', i) + 1;
         hasEndBracket = i > 0;
         startIndex = attr.indexOf('[', i);
         if (startIndex > 0) {
           newAttr = newAttr + attr.substring(i - 1, startIndex + 1);
         }
      }
      newAttr = newAttr + attr.substring(i - 1);
      return newAttr;
    }
1161769
public void setAttribute(String attrname, String value) {
        if (attributes == null)
            attributes = new ArrayList<Attribute>();
        Attribute.setAttribute(attributes, attrname, value);
    }
695271
function(el, attrName) {
                    var prop = attr.map[attrName];
                    if (typeof prop === "string" && el[prop]) {
                        return el[prop];
                    }

                    return el.getAttribute(attrName);
                }
244250
static function hidden($name, $value, $attr = array())
    {
        $attr = array_merge(
            array(
                "type" => "hidden"
            ),
            $attr
        );

        self::input($name, $value, $attr);
    }
762281
function( attr, val ) {
				var orgVal = this.getAttribute( attr );
				if ( val !== orgVal ) {
					!this._.attrChanges && ( this._.attrChanges = {} );

					// Saved the original attribute val.
					if ( !( attr in this._.attrChanges ) )
						this._.attrChanges[ attr ] = orgVal;

					this.setAttribute( attr, val );
				}
			}
203606
function _setAttributes(el, attrs) {
  Object.keys(attrs).forEach((key) => {
    el.setAttribute(key, attrs[key]);
  });
}
299620
function (attr, attrName) {
            if (_.isObject(attr) && !_.isDate(attr) && !_.isBoolean(attr) && !_.isString(attr) && !_.isNumber(attr) && !_.isFunction(attr) && !_.isRegExp(attr) && !_.isArray(attr)) {
                //attr = _removeAttributes();
                for (var aIndex in attr) {
                    attr[aIndex] = _removeAttributes(attr[aIndex], aIndex);
                }
                return attr;
            }
            else {
                if (_.indexOf(allowedAttributes, attrName) != -1) {
                    if (_.isFunction(attr)) {
                        attr = _functionName(attr);
                    }

                    return attr;
                }
                else {
                    return;
                }
            }
        }
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;
	}
1340091
public function attr($name, $value = null){
        if(is_null($value)){
            return $this->getAttributeValue($name);
        }else{
            return $this->setAttribute($name, $value);
        }
    }
1016543
function(attr, value) {
          var self = this,
              result = {},
              error;

          if(_.isObject(attr)){
            _.each(attr, function(value, key) {
              error = self.preValidate(key, value);
              if(error){
                result[key] = error;
              }
            });

            return _.isEmpty(result) ? undefined : result;
          }
          else {
            return validateAttr(this, attr, value, _.extend({}, this.attributes));
          }
        }