public function mergeAttributes($attributes)
    {
        $attributes = self::prepareAttributes($attributes);
        foreach ($this->watchedAttributes as $watchedKey) {
            if (isset($attributes[$watchedKey])) {
                $this->onAttributeChange($watchedKey, $attributes[$watchedKey]);
                unset($attributes[$watchedKey]);
            }
        }
        $this->attributes = array_merge($this->attributes, $attributes);
        return $this;
    }
public function mergeAttributes($attributes)
    {
        $attributes = self::prepareAttributes($attributes);
        foreach ($this->watchedAttributes as $watchedKey) {
            if (isset($attributes[$watchedKey])) {
                $this->onAttributeChange($watchedKey, $attributes[$watchedKey]);
                unset($attributes[$watchedKey]);
            }
        }
        $this->attributes = array_merge($this->attributes, $attributes);
        return $this;
    }
public function mergeAttributes ( $ attributes ) { $ attributes = self :: prepareAttributes ( $ attributes ) ; foreach ( $ this -> watchedAttributes as $ watchedKey ) { if ( isset ( $ attributes [ $ watchedKey ] ) ) { $ this -> onAttributeChange ( $ watchedKey , $ attributes [ $ watchedKey ] ) ; unset ( $ attributes [ $ watchedKey ] ) ; } } $ this -> attributes = array_merge ( $ this -> attributes , $ attributes ) ; return $ this ; }
Merges the existing attributes with the new ones

@param    mixed   Array of attribute 'name' => 'value' pairs or HTML attribute string
@return   HTML_Common2
Merges the existing attributes with the new ones