src/View/Helper/HtmlElementTrait.php
public function setAttributes($attributes)
    {
        if (isset($attributes['class'])) {
            $class = $attributes['class'];
            $this->setClass([$class]);
            unset($attributes['class']);
        }
        $this->attributes = $attributes;
        return $this;
    }
public function setAttributes($attributes)
    {
        if (isset($attributes['class'])) {
            $class = $attributes['class'];
            $this->setClass([$class]);
            unset($attributes['class']);
        }
        $this->attributes = $attributes;
        return $this;
    }
public function setAttributes ( $ attributes ) { if ( isset ( $ attributes [ 'class' ] ) ) { $ class = $ attributes [ 'class' ] ; $ this -> setClass ( [ $ class ] ) ; unset ( $ attributes [ 'class' ] ) ; } $ this -> attributes = $ attributes ; return $ this ; }
Set attribute associative array

@param  string[] $attributes
@return self
Set attribute associative array