CodeExplorer NoRecipient example
public function __construct(array|ContainerInterface
$channels, ChannelPolicyInterface
$policy = null
) { $this->channels =
$channels;
$this->policy =
$policy;
} public function send(Notification
$notification, RecipientInterface ...
$recipients): void
{ if (!
$recipients) { $recipients =
[new NoRecipient()];
} foreach ($recipients as $recipient) { foreach ($this->
getChannels($notification,
$recipient) as $channel =>
$transportName) { $channel->
notify($notification,
$recipient,
$transportName);
} } } public function addAdminRecipient(RecipientInterface
$recipient): void
{