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

namespace Kufer\KuferTools\Basis\AnwesenheitenKurs;

abstract class AnwesenheitenController extends \Kufer\KuferTools\Basis\Controller\ToolController
{
  protected function getRequestObj()
  {
    $toolId = $this->getToolId();
    \SessionOperations::setVarValueWTIntern('anwFilterTool' . $toolId, null);

    $requestObj = new AnwesenheitenRequest();
    $requestObj->einstieg = \GetOperations::getVarValue('einstieg');
    $requestObj->knr = \GetOperations::getVarValue('knr');
    $requestObj->belegId = \GetOperations::getVarValue('belid');

    return $requestObj;
  }

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

  abstract protected function getToolId();
}