src/HTMLTag.php
public function setAttribute($name, $value)
    {
        if(strlen($name) < 1)
        {
            throw new HTMLTagException("Attribute name is empty");
        }

        $this->tag_attributes[strtolower($name)] = $value;

        return $this;
    }
public function setAttribute($name, $value)
    {
        if(strlen($name) < 1)
        {
            throw new HTMLTagException("Attribute name is empty");
        }

        $this->tag_attributes[strtolower($name)] = $value;

        return $this;
    }
public function setAttribute ( $ name , $ value ) { if ( strlen ( $ name ) < 1 ) { throw new HTMLTagException ( "Attribute name is empty" ) ; } $ this -> tag_attributes [ strtolower ( $ name ) ] = $ value ; return $ this ; }
Sets the attribute of this tag to the value given,
a value of NULL will list the attribute with no ="value" after
@param   string  $name
@param   string|null $value
@return  HTMLTag
@throws  HTMLTagException
Sets the attribute of this tag to the value given a value of NULL will list the attribute with no = value after