public function setAttribute($name, $value = null)
    {
        $name = strtolower($name);
        if (is_null($value)) {
            $value = $name;
        }
        if (in_array($name, $this->watchedAttributes)) {
            $this->onAttributeChange($name, $value);
        } else {
            $this->attributes[$name] = (string)$value;
        }
        return $this;
    }
public function setAttribute($name, $value = null)
    {
        $name = strtolower($name);
        if (is_null($value)) {
            $value = $name;
        }
        if (in_array($name, $this->watchedAttributes)) {
            $this->onAttributeChange($name, $value);
        } else {
            $this->attributes[$name] = (string)$value;
        }
        return $this;
    }
public function setAttribute ( $ name , $ value = null ) { $ name = strtolower ( $ name ) ; if ( is_null ( $ value ) ) { $ value = $ name ; } if ( in_array ( $ name , $ this -> watchedAttributes ) ) { $ this -> onAttributeChange ( $ name , $ value ) ; } else { $ this -> attributes [ $ name ] = ( string ) $ value ; } return $ this ; }
Sets the value of the attribute

@param    string  Attribute name
@param    string  Attribute value (will be set to $name if omitted)
@return   HTML_Common2
Sets the value of the attribute