<?php
namespace App\Live;
use App\Live\SocketNotifier;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
class FlushSocketNotifierListener
{
public function __construct(private readonly SocketNotifier $notifier)
{
}
public function onKernelResponse(ResponseEvent $event): void
{
$this->notifier->flush();
}
}