feat: decouple logic using events

This commit is contained in:
Björn Fromme committed 2024-07-18 11:09:49 +02:00
1 parent 174ae5e5e3
commit 3a77697d9d
13 files changed
+190 -27

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Event;
use App\Entity\Application;
use Symfony\Contracts\EventDispatcher\Event;
class ApplicationCreatedEvent extends Event
{
public const NAME = 'application.created';
public function __construct(private readonly Application $application)
{}
public function getApplication(): Application
{
return $this->application;
}
}