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

namespace Kufer\Web\Classes\Export;


class ExportAbweichenderZahler extends \ExportMitPflichtUndValidierungsFehler
{
  
  public function initiate()
  {
    parent::initiate();
    if (!$this->expCalculation instanceof \ExportCalculation) {
      $this->expCalculation = new \ExportCalculation($this);
    }
  }

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return parent::getVarValue($varname);
      case 'abw_': return $this->expCalculation->getVarValue4AbweichenderZahler(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
      case 'abwedit_': return $this->expCalculation->getVarValue4AbweichenderZahlerEdit(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
      case 'abwbest_': return $this->expCalculation->getVarValue4AbweichenderZahlerBest(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
    }
  }
}