<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class WeitereKursInfo extends KursInfo 
{
  public $_data;

  public function __construct()
  {
    parent::__construct();
    $this->_data = array();
  }

  public function getWeitereValue($pVarname, $pIndex)
  {
    if (!is_numeric($pIndex) || $pIndex < 0 || $pIndex >= count($this->_data)) {
      return '';
    }

    return $this->_data[$pIndex]->getVarValue($pVarname);
  }

  public function setWeitereValue($pVarname, $pIndex, $pValue)
  {
    $this->_data[$pIndex]->setValue2Var($pVarname, $pValue);
  }

  
  public function addWeitere()
  {
    $this->_data[] = new Weitere();
  }

  
  public function getAnzahlWeitere()
  {
    return count($this->_data);
  }

  public function clearWeitere()
  {
    $this->_data = array();
  }
}