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

class ExportKalender extends ExportBasis
{
  public $jahr;
  public $monat;
  public $veranart;

  
  public function initiate()
  {
    ExportBasis::initiate();
  }

  
  public function getVarValue($varname)
  {
    switch ($this->getVarCategory($varname)) {
      default: return ExportBasis::getVarValue($varname);
      case 'kal_':
        if ($this->jahr == '') {
          $this->jahr = date('Y');
        }
        if ($this->monat == '') {
          $this->monat = date('n');
        }
        if ($this->veranart == '') {
          $settings = ToolSettingsAPI::getToolSettings(4);
          $this->veranart = $settings->kalenderVeranart;
        }

        return $this->expCalculation->getVarValue4Kalender($this->getVarName($varname), $this->monat, $this->jahr, $this->veranart);
      }
  }
}