public function setAttributes($attributes)
    {
        if (count($safe = static::getSafeAttributes($this->_action))) {
            foreach ($safe as $attribute) {
                if (isset($attributes[$attribute])) {
                    $this->$attribute = $attributes[$attribute];
                }
            }
            return $this;
        }
        foreach ($attributes as $name => $value) {
            $this->$name = $value;
        }
        return $this;
    }