<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

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

abstract class TNBestaetigungController extends \Kufer\Web\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);
    }
  }
}