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


class ExportKursEMails extends ExportBasis
{
  
  public function initiate()
  {
    ExportBasis::initiate();
    $this->dboperations = new DBWorkDozentenHonorar();
  }

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

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return ExportBasis::getVarValue($varname);
      
      case 'datdoc_': return $this->expCalculation->getDefaultVarValue($this->getVarName($varname), $this->exportresults[$this->actualset]);
      case 'personn_':
      case 'person_': return $this->expCalculation->getDefaultVarValue($this->getVarName($varname), $this->exportresults[$this->actualset]->getPerson());
      case 'k_': return $this->expCalculation->getVarValue4Kurs($this->getVarName($varname), $this->exportresults[$this->actualset]->getKurs());
    }
  }
}