public function appendAttr(DOMElement &$element, $name, $value)
    {
        // Create new attribute value
        $value = trim((string)$value);
        $old_value = $element->getAttribute($name);
        $value = trim(trim((string)$old_value) . ' ' . $value);

        // Set new attribute value
        return $this->attr($element, $name, $value);
    }
public function appendAttr(DOMElement &$element, $name, $value)
    {
        // Create new attribute value
        $value = trim((string)$value);
        $old_value = $element->getAttribute($name);
        $value = trim(trim((string)$old_value) . ' ' . $value);

        // Set new attribute value
        return $this->attr($element, $name, $value);
    }
public function appendAttr ( DOMElement & $ element , $ name , $ value ) { // Create new attribute value $ value = trim ( ( string ) $ value ) ; $ old_value = $ element -> getAttribute ( $ name ) ; $ value = trim ( trim ( ( string ) $ old_value ) . ' ' . $ value ) ; // Set new attribute value return $ this -> attr ( $ element , $ name , $ value ) ; }
Append a value into an attribute with a space between.

@param DOMElement $element The DOMElement to handle.
@param string     $name    The name of the attribute
@param string     $value   The value to be appended.

@return string The new attribute value.

@throws Exception
Append a value into an attribute with a space between .