original_string: function updateElementAttr($elements, $attrs)
      {
          if (is_string($elements)) {
              $elements = preg_split('/[ ]?,[ ]?/', $elements);
          }
          foreach (array_keys($elements) as $key) {
              if (is_object($elements[$key]) && is_a($elements[$key], 'HTML_QuickForm_element')) {
                  $elements[$key]->updateAttributes($attrs);
              } elseif (isset($this->_elementIndex[$elements[$key]])) {
                  $this->_elements[$this->_elementIndex[$elements[$key]]]->updateAttributes($attrs);
                  if (isset($this->_duplicateIndex[$elements[$key]])) {
                      foreach ($this->_duplicateIndex[$elements[$key]] as $index) {
                          $this->_elements[$index]->updateAttributes($attrs);
                      }
                  }
              }
          }
      }
code: function updateElementAttr($elements, $attrs)
      {
          if (is_string($elements)) {
              $elements = preg_split('/[ ]?,[ ]?/', $elements);
          }
          foreach (array_keys($elements) as $key) {
              if (is_object($elements[$key]) && is_a($elements[$key], 'HTML_QuickForm_element')) {
                  $elements[$key]->updateAttributes($attrs);
              } elseif (isset($this->_elementIndex[$elements[$key]])) {
                  $this->_elements[$this->_elementIndex[$elements[$key]]]->updateAttributes($attrs);
                  if (isset($this->_duplicateIndex[$elements[$key]])) {
                      foreach ($this->_duplicateIndex[$elements[$key]] as $index) {
                          $this->_elements[$index]->updateAttributes($attrs);
                      }
                  }
              }
          }
      }
code_tokens: function updateElementAttr ( $ elements , $ attrs ) { if ( is_string ( $ elements ) ) { $ elements = preg_split ( '/[ ]?,[ ]?/' , $ elements ) ; } foreach ( array_keys ( $ elements ) as $ key ) { if ( is_object ( $ elements [ $ key ] ) && is_a ( $ elements [ $ key ] , 'HTML_QuickForm_element' ) ) { $ elements [ $ key ] -> updateAttributes ( $ attrs ) ; } elseif ( isset ( $ this -> _elementIndex [ $ elements [ $ key ] ] ) ) { $ this -> _elements [ $ this -> _elementIndex [ $ elements [ $ key ] ] ] -> updateAttributes ( $ attrs ) ; if ( isset ( $ this -> _duplicateIndex [ $ elements [ $ key ] ] ) ) { foreach ( $ this -> _duplicateIndex [ $ elements [ $ key ] ] as $ index ) { $ this -> _elements [ $ index ] -> updateAttributes ( $ attrs ) ; } } } } }
docstring: Updates Attributes for one or more elements
  
  @param      mixed    $elements   Array of element names/objects or string of elements to be updated
  @param      mixed    $attrs      Array or sting of html attributes
  @since      2.10
  @access     public
  @return     void
docstring_tokens: Updates Attributes for one or more elements