src/Tag.php
public function set($name, $value = null)
    {
        if (is_string($name)) {
            $name = $this->cleanAttributeName($name);
            if ($value === null && isset($this->props[$name])) {
                unset($this->props[$name]);
            } elseif ($value !== null) {
                $this->props[$name] = $value;
            }
        }

        return $this;
    }
public function set($name, $value = null)
    {
        if (is_string($name)) {
            $name = $this->cleanAttributeName($name);
            if ($value === null && isset($this->props[$name])) {
                unset($this->props[$name]);
            } elseif ($value !== null) {
                $this->props[$name] = $value;
            }
        }

        return $this;
    }
public function set ( $ name , $ value = null ) { if ( is_string ( $ name ) ) { $ name = $ this -> cleanAttributeName ( $ name ) ; if ( $ value === null && isset ( $ this -> props [ $ name ] ) ) { unset ( $ this -> props [ $ name ] ) ; } elseif ( $ value !== null ) { $ this -> props [ $ name ] = $ value ; } } return $ this ; }
Set a single property to the HTML element

@param string $name
@param mixed $value

@return Tag
Set a single property to the HTML element