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

namespace Kufer\KuferTools\Firma\BayerischerApothekertag\AnmeldeFormular;

class AnmeldeFormularController extends \Kufer\KuferTools\Basis\Controller\ToolController
{
  private $anmeldeStatus;

  public function __construct($pAnmeldeStatus = null)
  {
    $this->anmeldeStatus = $pAnmeldeStatus;
  }

  protected function getUseCase(): \Kufer\KuferTools\Basis\UseCase\UseCase
  {
    return new AnmeldeFormularUseCase(
      $this->getRequestObj()
    );
  }

  protected function getRequestObj()
  {
    $request = new AnmeldeFormularRequest();
    $request->einstieg = \GetOperations::isDefined('einstieg');
    $request->action = \PostOperations::getVarValue('action');
    $request->knrAry = explode(':', \GetOperations::getVarValue('knrs'));

    return $request;
  }

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