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

namespace Kufer\KuferTools\Teilnehmer\VhsNachricht;

class SendVhsNachrichtController extends \Kufer\KuferTools\Basis\Controller\ToolController
{
  protected function getUseCase()
  {
    return new SendVhsNachrichtUseCase($this->getRequestObj());
  }
  
  protected function getRequestObj()
  {
    $requestObj = new SendVhsNachrichtRequest();
    $requestObj->nachricht_betreff = \PostOperations::getVarValue('nachricht_betreff');
    $requestObj->nachricht_body = \PostOperations::getVarValue('nachricht_body');
    
    
    $action = \GetOperations::getVarValue('action');
    $requestObj = $this->handleXsrf($requestObj, $action);
    return $requestObj;
  }
  
  function getPresenter($pUseCaseResponse)
  {
    return new SendVhsNachrichtPresenter($pUseCaseResponse);
  }
}