<?php
/**
* This file is part of the CosaVostra, TrackPay package.
*
* (c) Mohamed Radhi GUENNICHI <rg@mate.tn> <+216 50 711 816>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App\EventSubscriber;
use App\Event\ProcedureStepNotificationMethodEvent;
use App\Service\EmailParametersGenerator;
use App\Service\PdfGeneratorService;
use App\Service\Sendinblue\SMTPApi;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ProcedureStepNotificationMethodSubscriber implements EventSubscriberInterface
{
/**
* @var SMTPApi
*/
protected $smtp;
/**
* @var EmailParametersGenerator
*/
protected $parametersGenerator;
/**
* @var PdfGeneratorService
*/
protected $pdfGenerator;
/**
* ProcedureDispatchSubscriber constructor.
*
* @param SMTPApi $smtp
* @param EmailParametersGenerator $parametersGenerator
* @param PdfGeneratorService $pdfGenerator
*/
public function __construct(SMTPApi $smtp, EmailParametersGenerator $parametersGenerator, PdfGeneratorService $pdfGenerator)
{
$this->smtp = $smtp;
$this->parametersGenerator = $parametersGenerator;
$this->pdfGenerator = $pdfGenerator;
}
/**
* @inheritDoc
*/
public static function getSubscribedEvents()
{
return [
ProcedureStepNotificationMethodEvent::class => 'onNotificationMethod'
];
}
public function onNotificationMethod(ProcedureStepNotificationMethodEvent $event): void
{
// TODO: add other notification methods handlers here.
}
}