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

class ExportArtikel extends ExportBasis
{
  
  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 'art_': return $this->expCalculation->getVarValue4Artikel(
        $this->getVarName($varname),
        $this->exportresults[$this->actualset]
      );
      case 'foto_': return $this->expCalculation->getVarValue4Artikel(
        $varname,
        $this->exportresults[$this->actualset]
      );
    }
  }
}