public function setAttribute($key, $value)
    {
        $key = strtolower($key);
        if ( ! is_array($value)) {
            $value = [
                'value'       => $value,
                'doubleQuote' => true,
            ];
        }
        $this->attr[$key] = $value;

        return $this;
    }
public function setAttribute($key, $value)
    {
        $key = strtolower($key);
        if ( ! is_array($value)) {
            $value = [
                'value'       => $value,
                'doubleQuote' => true,
            ];
        }
        $this->attr[$key] = $value;

        return $this;
    }
public function setAttribute ( $ key , $ value ) { $ key = strtolower ( $ key ) ; if ( ! is_array ( $ value ) ) { $ value = [ 'value' => $ value , 'doubleQuote' => true , ] ; } $ this -> attr [ $ key ] = $ value ; return $ this ; }
Set an attribute for this tag.

@param string $key
@param string|array $value
@return $this
Set an attribute for this tag .