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

namespace Kufer\Web\KuferTools\Veranstalter\LeiterMitarbeiterAndererVeranstalter\SammelEMail;

class SammelEMailController extends \Kufer\Web\KuferTools\Basis\Controller\ToolController
{
  protected function getUseCase(): \Kufer\Web\KuferTools\Basis\UseCase\UseCase
  {
    return new SammelEMailUseCase(
      $this->getRequestObj()
    );
  }

  protected function getRequestObj()
  {
    $requestObj = new SammelEMailRequest();
    $requestObj->dozNummern = \RequestOperations::getVarValue('dozenten', array());
    $requestObj->referer = \GetOperations::getVarValue('referer');
    $requestObj->refererLabel = \GetOperations::getVarValue('refererLabel');

    return $requestObj;
  }

  protected function getPresenter($pUseCaseResponse)
  {
    return new SammelEMailPresenter($pUseCaseResponse);
  }
}