<?php

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

namespace Kufer\KuferTools\Basis\Anmeldung\KursUebersicht\HandleAnmeldung;

abstract class HandleAnmeldungController extends \Kufer\KuferTools\Basis\Controller\ToolController
{
  protected function getRequestObj()
  {
    $requestObj = new HandleAnmeldungRequest();
    $requestObj->knr = \RequestOperations::getVarValue('knr');
    $requestObj->zahlart = \PostOperations::getVarValue('anm_zahlart');
    $requestObj->abwBankverbindungAngegeben = \PostOperations::isDefined('abw_iban');
    $requestObj->abw_isNurFuerAnmeldung = \PostOperations::getVarValue('abw_isNurFuerAnmeldung', false) === 'true';
    $requestObj->abw_verfahren = \PostOperations::getVarValue('abw_verfahren');
    $requestObj->abw_inhaber = \PostOperations::getVarValue('abw_inhaber');
    $requestObj->abw_bank = \PostOperations::getVarValue('abw_bank');
    $requestObj->abw_kto = \PostOperations::getVarValue('abw_kto');
    $requestObj->abw_kto = \PostOperations::getVarValue('abw_kto');
    $requestObj->abw_blz = \PostOperations::getVarValue('abw_blz');
    $requestObj->abw_bic = \PostOperations::getVarValue('abw_bic');
    $requestObj->abw_iban = \PostOperations::getVarValue('abw_iban');

    $action = $this->getActionVal();

    return $this->handleXsrf($requestObj, $action, $requestObj->knr);
  }
}