/**
  * Sets the Container that will be used as a prototype for repeating
  *
  * @param HTML_QuickForm2_Container $prototype prototype container
  *
  * @return $this
  */
 public function setPrototype(HTML_QuickForm2_Container $prototype)
 {
     if (!empty($this->elements[0])) {
         parent::removeChild($this->elements[0]);
         $this->elements = array();
     }
     parent::appendChild($prototype);
     return $this;
 }