PHP Class LaravelFCM\Sender\FCMSender

Inheritance: extends HTTPSender
Datei anzeigen Open project: brozot/laravel-fcm Class Usage Examples

Public Methods

Method 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

Method Description
post ( $request ) : null | Psr\Http\Message\ResponseInterface

Method Details

sendTo() public method

- 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
return LaravelFCM\Response\DownstreamResponse | null

sendToGroup() public method

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
return LaravelFCM\Response\GroupResponse

sendToTopic() public method

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
return LaravelFCM\Response\TopicResponse