public function setAttribute($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->attributes[$k] = $v;
            }
        } else {
            $this->attributes[$name] = $value;
        }
    }
public function setAttribute($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $k => $v) {
                $this->attributes[$k] = $v;
            }
        } else {
            $this->attributes[$name] = $value;
        }
    }
public function setAttribute ( $ name , $ value = null ) { if ( is_array ( $ name ) ) { foreach ( $ name as $ k => $ v ) { $ this -> attributes [ $ k ] = $ v ; } } else { $ this -> attributes [ $ name ] = $ value ; } }
Set an event attribute.

@param string|array $name
@param mixed $value
Set an event attribute .