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

use Kufer\Web\Classes\Export\ExportCalculation;

class ExportAdresse extends ExportBasisExt
{
  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]);
      }
    }
  }

  protected function getExportCalc(string $prefix): ?ExportCalculation\ExportCalc
  {
    switch ($prefix) {
      case 'adr_':
        return new ExportCalculation\ExportCalcAdresse($this->getExportCalcBlaettern());
    }

    return null;
  }
}