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

namespace Kufer\Web\KuferTools\Basis\Kursdetails\TnBestaetigung;

abstract class TNBestaetigungController extends \Kufer\KuferTools\Basis\Controller\Controller
{
  protected function getNewRequestObj(): TNBestaetigungRequest
  {
    return new TNBestaetigungRequest();
  }

  protected function getRequestObj()
  {
    $result = $this->getNewRequestObj();
    $result->knr = \GetOperations::getVarValue('knr');

    return $result;
  }

  protected function getPresenter($pUseCaseResponse)
  {
    if (\DBWorkBASysSettings::isBadMergentheimFabi()) {
      return new TNBestaetigungBadMergentheimFabiPresenter($pUseCaseResponse);
    } else {
      return new TNBestaetigungPresenter($pUseCaseResponse);
    }
  }
}