PHP Class LaravelFCM\Sender\FCMSender

Inheritance: extends HTTPSender
Afficher le fichier Open project: brozot/laravel-fcm Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
post ( $request ) : null | Psr\Http\Message\ResponseInterface

Method Details

sendTo() public méthode

- 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
Résultat LaravelFCM\Response\DownstreamResponse | null

sendToGroup() public méthode

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
Résultat LaravelFCM\Response\GroupResponse

sendToTopic() public méthode

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
Résultat LaravelFCM\Response\TopicResponse