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


class ExportStammhoerer extends ExportTeilnehmer
{
  
  public function initiate()
  {
    ExportBasis::initiate();
    $this->dboperations = new DBWorkTeilnehmer();
  }

  
  public function export()
  {
    $this->clearResult();
    for ($i = 0; $i < count($this->exportsets); $i++) {
      $tmp = $this->dboperations->getTeilnehm($this->exportsets[$i]->id);
      if (isset($tmp->id)) {
        array_push($this->exportresults, $tmp);
      }
    }
  }

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return parent::getVarValue($varname);
      case 'told_':
        
        
        
        if (isset($this->exportresults[$this->actualset]->oldStammhoererData)) {
          return $this->expCalculation->getVarValue4StammhoererLogin($this->getVarName($varname), $this->exportresults[$this->actualset]->oldStammhoererData);
        } else {
          return '';
        }
    }
  }
}