PHP Класс LaravelFCM\Sender\FCMSender

Наследование: extends HTTPSender
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
sendTo ( String | array $to, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : DownstreamResponse | null send a downstream message to
sendToGroup ( $notificationKey, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : GroupResponse Send a message to a group of devices identified with them notification key
sendToTopic ( Topics $topics, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : TopicResponse Send message devices registered at a or more topics

Приватные методы

Метод Описание
post ( $request ) : null | Psr\Http\Message\ResponseInterface

Описание методов

sendTo() публичный Метод

- a unique device with is registration Token - or to multiples devices with an array of registrationIds
public sendTo ( String | array $to, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : DownstreamResponse | null
$to String | array
$options LaravelFCM\Message\Options
$notification LaravelFCM\Message\PayloadNotification
$data LaravelFCM\Message\PayloadData
Результат LaravelFCM\Response\DownstreamResponse | null

sendToGroup() публичный Метод

Send a message to a group of devices identified with them notification key
public sendToGroup ( $notificationKey, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : GroupResponse
$notificationKey
$options LaravelFCM\Message\Options
$notification LaravelFCM\Message\PayloadNotification
$data LaravelFCM\Message\PayloadData
Результат LaravelFCM\Response\GroupResponse

sendToTopic() публичный Метод

Send message devices registered at a or more topics
public sendToTopic ( Topics $topics, Options $options = null, PayloadNotification $notification = null, PayloadData $data = null ) : TopicResponse
$topics LaravelFCM\Message\Topics
$options LaravelFCM\Message\Options
$notification LaravelFCM\Message\PayloadNotification
$data LaravelFCM\Message\PayloadData
Результат LaravelFCM\Response\TopicResponse