Minify XPath expressions in given attribute

@param  DOMAttr $attribute
@return void
500621
protected function replaceAVT(DOMAttr $attribute)
	{
		AVTHelper::replace(
			$attribute,
			function ($token)
			{
				if ($token[0] === 'expression')
				{
					$token[1] = XPathHelper::minify($token[1]);
				}

				return $token;
			}
		);
	}
976577
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
        case 'etag':
            // ETags are special, since they can be conveyed by either the
            // HTTP ETag header or as an XML attribute.
            $etag = $attribute->nodeValue;
            if ($this->_etag === null) {
                $this->_etag = $etag;
            }
            elseif ($this->_etag != $etag) {
                require_once('Zend/Gdata/App/IOException.php');
                throw new Zend_Gdata_App_IOException("ETag mismatch");
            }
            break;
        default:
            parent::takeAttributeFromDOM($attribute);
            break;
        }
    }
481696
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
        case 'specialized':
            if ($attribute->nodeValue == "true") {
                $this->_specialized = true;
            }
            else if ($attribute->nodeValue == "false") {
                $this->_specialized = false;
            }
            else {
                throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
            }
            break;
        default:
            parent::takeAttributeFromDOM($attribute);
        }
    }
327877
private function cleanAttrValue(DOMAttr $domAttr)
    {
        $attrName = strtolower($domAttr->name);
        if ($attrName === 'style' && !empty($this->config->WhiteListStyle)) {
            $styles = explode(';', $domAttr->value);
            foreach ($styles as $key => &$subStyle) {
                $subStyle = array_map("trim", explode(':', strtolower($subStyle), 2));
                if (empty($subStyle[0]) || !in_array($subStyle[0], $this->config->WhiteListStyle)) {
                    unset($styles[$key]);
                }
            }
            $implodeFunc = function ($styleSheet) {
                return implode(':', $styleSheet);
            };
            $domAttr->ownerElement->setAttribute($attrName, implode(';', array_map($implodeFunc, $styles)) . ';');
        }
        if ($attrName === 'class' && !empty($this->config->WhiteListCssClass)) {
            $domAttr->ownerElement->setAttribute($attrName, implode(' ', array_intersect(preg_split('/\s+/', $domAttr->value), $this->config->WhiteListCssClass)));
        }
        if ($attrName === 'src' || $attrName === 'href') {
            if (strtolower(parse_url($domAttr->value, PHP_URL_SCHEME)) === 'javascript') {
                $domAttr->ownerElement->removeAttribute($attrName);
            } else {
                $domAttr->ownerElement->setAttribute($attrName, filter_var($domAttr->value, FILTER_SANITIZE_URL));
            }
        }
    }
1201494
protected function initializeAttributeOnData( $attribute )
	{
		$explicitPath = $this->getLeadingExplicitAttributePath( $attribute );

		$data = $this->extractDataFromPath( $explicitPath );

		if ( !Str::contains( $attribute, '*' ) || Str::endsWith( $attribute, '*' ) )
		{
			return $data;
		}

		return data_set( $data, $attribute, null, true );
	}
1289858
public function getHtml(array $attributes = []): string
    {
        if ($this->minimumValue !== null) {
            $attributes['min'] = $this->minimumValue;
        }

        if ($this->maximumValue !== null) {
            $attributes['max'] = $this->maximumValue;
        }

        return parent::getHtml($attributes);
    }
385126
public function setDOMElementAttribute(DOMElement $element, $attribute, $value)
    {
        XmlUtils::setDOMElementAttribute($element, $this->getAttributeName($element, $attribute), $value);
    }
149013
protected function takeAttributeFromDOM($attribute)
    {
        $absoluteAttrName = $attribute->namespaceURI . ':' . $attribute->localName;
        if ($absoluteAttrName == $this->lookupNamespace('yt') . ':' . 'format') {
            $this->_format = $attribute->nodeValue;
        } else {
            parent::takeAttributeFromDOM($attribute);
        }
    }
520675
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
        case 'url':
            $this->_url = $attribute->nodeValue;
            break;
        default:
            parent::takeAttributeFromDOM($attribute);
        }
    }
278207
protected function validateAttribute($object, $attribute)
    {
        $method = $this->method;
        $object->{$method}($attribute, $this->params);
    }
190715
protected function takeAttributeFromDOM($attribute)
    {
        switch ($attribute->localName) {
            case 'url':
                $this->_url = $attribute->nodeValue;
                break;
            case 'fileSize':
                $this->_fileSize = $attribute->nodeValue;
                break;
            case 'type':
                $this->_type = $attribute->nodeValue;
                break;
            case 'medium':
                $this->_medium = $attribute->nodeValue;
                break;
            case 'isDefault':
                $this->_isDefault = $attribute->nodeValue;
                break;
            case 'expression':
                $this->_expression = $attribute->nodeValue;
                break;
            case 'bitrate':
                $this->_bitrate = $attribute->nodeValue;
                break;
            case 'framerate':
                $this->_framerate = $attribute->nodeValue;
                break;
            case 'samplingrate':
                $this->_samplingrate = $attribute->nodeValue;
                break;
            case 'channels':
                $this->_channels = $attribute->nodeValue;
                break;
            case 'duration':
                $this->_duration = $attribute->nodeValue;
                break;
            case 'height':
                $this->_height = $attribute->nodeValue;
                break;
            case 'width':
                $this->_width = $attribute->nodeValue;
                break;
            case 'lang':
                $this->_lang = $attribute->nodeValue;
                break;
            default:
                parent::takeAttributeFromDOM($attribute);
        }
    }
1362545
public function tr(array $attributes = []): void
    {
        $this->trArray[] = Tags::tr($this->tdArray, $attributes);
        $this->tdArray = [];
    }
206747
function _removeAttr($attr, &$attributes)
    {
        $attr = strtolower($attr);
        if (isset($attributes[$attr])) {
            unset($attributes[$attr]);
        }
    }
183794
public static function allAttributesFrom(string $attribute) {
		$modules = self::all();
		$result = [];
		foreach ($modules as $module) {
			if ($module->$attribute) {
				$attr = $module->$attribute;
				
				if (is_array($attr)) {
					foreach ($attr as $item) {
						$result[] = $item;
					}
				}
				else {
					$result[] = $attr;
				}
			}
		}
		
		return empty($result) ? null : $result;
	}
1055805
public function dontSeeElementInDOM($selector, $attributes = [])
    {
        $els = $this->match($this->getBaseElement(), $selector);
        $els = $this->filterByAttributes($els, $attributes);
        $this->assertEmpty($els);
    }
279406
function getAttribute($xml, $attribute)
    {
        if($xml instanceof SimpleXMLElement) {
	        $attributes = $xml->attributes();
	        if (isset($attributes[$attribute])) {
		        $xml = (string)$attributes[$attribute];
	        } else {
		        $xml = null;
	        }
        } else {
            $xml = null;
        }
        return $xml;
    }
138463
public function removeAttribute(Attribute $attribute)
    {
        foreach ($this->attributes as $key => $attributeElement) {
            if ($attributeElement === $attribute) {
                unset($this->attributes[$key]);
                break;
            }
        }

        return $this;
    }