public function setAttributeArray(array $attributes = null)
    {
        if (!is_array($attributes) || empty($attributes)) {
            return;
        }

        foreach ($attributes as $name => $value) {
            $this->setAttribute($name, $value);
        }
    }
public function setAttributeArray(array $attributes = null)
    {
        if (!is_array($attributes) || empty($attributes)) {
            return;
        }

        foreach ($attributes as $name => $value) {
            $this->setAttribute($name, $value);
        }
    }
public function setAttributeArray ( array $ attributes = null ) { if ( ! is_array ( $ attributes ) || empty ( $ attributes ) ) { return ; } foreach ( $ attributes as $ name => $ value ) { $ this -> setAttribute ( $ name , $ value ) ; } }
A convenience method to quickly add multiple attributes to
an `XMLElement`

@param array $attributes
Associative array with the key being the name and
the value being the value of the attribute.
A convenience method to quickly add multiple attributes to an XMLElement