use Symfony\Component\Notifier\Recipient\RecipientInterface;
/**
* @author Fabien Potencier <fabien@symfony.com>
*/
final class BrowserChannel implements ChannelInterface
{ private RequestStack
$stack;
private FlashMessageImportanceMapperInterface
$mapper;
public function __construct(RequestStack
$stack, FlashMessageImportanceMapperInterface
$mapper =
new DefaultFlashMessageImportanceMapper()) { $this->stack =
$stack;
$this->mapper =
$mapper;
} public function notify(Notification
$notification, RecipientInterface
$recipient, string
$transportName = null
): void
{ if (null ===
$request =
$this->stack->
getCurrentRequest()) { return;
}