Example #1
0
 /**
  * Adds an item to the form, checking to see if its $_POST or $_FILES
  * variant exists and if so, uses that as the value.
  *
  * @param integer|string|null $index The index to set the new item at.
  * @param mixed $item An element or a label containing one.
  * @return void
  */
 public function offsetSet($index, $item)
 {
     if ($item instanceof Fieldset) {
         foreach ($item as $subitem) {
             $this->setValue($subitem);
         }
     } else {
         $this->setValue($item);
     }
     parent::offsetSet($index, $item);
 }