src/View/Helper/HtmlElementTrait.php
public function setAttribute($key, $valueue)
    {
        if ($key === 'class') {
            $this->setClass([$valueue]);
        }
        $this->attributes[$key] = $valueue;
        return $this;
    }
public function setAttribute($key, $valueue)
    {
        if ($key === 'class') {
            $this->setClass([$valueue]);
        }
        $this->attributes[$key] = $valueue;
        return $this;
    }
public function setAttribute ( $ key , $ valueue ) { if ( $ key === 'class' ) { $ this -> setClass ( [ $ valueue ] ) ; } $ this -> attributes [ $ key ] = $ valueue ; return $ this ; }
Set an attribute on this element

@param  string $key
@param  string $valueue
@return self
Set an attribute on this element