Spec-Zone.ru › Laravel 7

NotificationSender

class NotificationSender (View source)

Трейты

Localizable

Свойства

protected ChannelManager $manager

Экземпляр менеджера уведомлений.

protected Dispatcher $bus

Экземпляр диспетчера Bus.

protected Dispatcher $events

Диспетчер событий.

protected string|null $locale

Язык, который будет использоваться при отправке уведомлений.

Методы

mixed withLocale(string $locale, Closure $callback)

Выполнить callback с заданным языком.

из Localizable
void __construct(ChannelManager $manager, Dispatcher $bus, Dispatcher $events, string|null $locale = null)

Создать новый экземпляр отправителя уведомлений.

void send(Collection|array|mixed $notifiables, mixed $notification)

Отправить данное уведомление заданным сущностям, которые могут получать уведомления.

void sendNow(Collection|array|mixed $notifiables, mixed $notification, array $channels = null)

Отправить данное уведомление немедленно.

string|null preferredLocale(mixed $notifiable, mixed $notification)

Получить предпочтительный язык получателя уведомления.

void sendToNotifiable(mixed $notifiable, string $id, mixed $notification, string $channel)

Отправить данное уведомление заданному получателю через канал.

bool shouldSendNotification(mixed $notifiable, mixed $notification, string $channel)

Определяет, можно ли отправить уведомление.

void queueNotification(mixed $notifiables, Notification $notification)

Поместить данные уведомления в очередь.

Collection|array formatNotifiables(mixed $notifiables)

Отформатировать получателей уведомлений в Collection / массив, если необходимо.

Детали

mixed withLocale(string $locale, Closure $callback)

Выполнить callback с заданным языком.

Параметры

строка $locale
Closure $callback

Возвращаемое значение

mixed

void __construct(ChannelManager $manager, Dispatcher $bus, Dispatcher $events, string|null $locale = null)

Создать новый экземпляр отправителя уведомлений.

Параметры

ChannelManager $manager
Dispatcher $bus
Dispatcher $events
string|null $locale

Возвращаемое значение

void

void send(Collection|array|mixed $notifiables, mixed $notification)

Отправить данное уведомление заданным сущностям, которые могут получать уведомления.

Параметры

Collection|array|mixed $notifiables
mixed $notification

Возвращаемое значение

void

void sendNow(Collection|array|mixed $notifiables, mixed $notification, array $channels = null)

Отправить данное уведомление немедленно.

Параметры

Collection|array|mixed $notifiables
mixed $notification
array $channels

Возвращаемое значение

void

protected string|null preferredLocale(mixed $notifiable, mixed $notification)

Получить предпочтительный язык получателя уведомления.

Параметры

mixed $notifiable
mixed $notification

Возвращаемое значение

string|null

protected void sendToNotifiable(mixed $notifiable, string $id, mixed $notification, string $channel)

Отправить данное уведомление заданному получателю через канал.

Параметры

mixed $notifiable
string $id
mixed $notification
string $channel

Возвращаемое значение

void

protected bool shouldSendNotification(mixed $notifiable, mixed $notification, string $channel)

Определяет, можно ли отправить уведомление.

Параметры

mixed $notifiable
mixed $notification
string $channel

Возвращаемое значение

bool

protected void queueNotification(mixed $notifiables, Notification $notification)

Поместить данные уведомления в очередь.

Параметры

mixed $notifiables
Notification $notification

Возвращаемое значение

void

protected Collection|array formatNotifiables(mixed $notifiables)

Форматировать уведомления в Коллекцию / массив, если необходимо.

Параметры

mixed $notifiables

Возвращаемое значение

Collection|array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Notifications/NotificationSender.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API