PHP Class paragraph1\phpFCM\Message

Author: palbertini
Inheritance: implements JsonSerializable
Afficher le fichier Open project: paragraph1/php-fcm Class Usage Examples

Méthodes publiques

Méthode Description
addRecipient ( paragraph1\phpFCM\Recipient\Recipient $recipient ) : Message where should the message go
jsonSerialize ( )
setCollapseKey ( string $collapseKey ) : Message
setContentAvailable ( ) : Message
setData ( array $data )
setDelayWhileIdle ( boolean $delayWhileIdle ) : Message
setNotification ( Notification $notification )
setPriority ( string $priority ) : Message normal or high, use class constants as value
setTimeToLive ( integer $ttl ) : Message

Private Methods

Méthode Description
createTo ( array &$jsonData )

Method Details

addRecipient() public méthode

where should the message go
public addRecipient ( paragraph1\phpFCM\Recipient\Recipient $recipient ) : Message
$recipient paragraph1\phpFCM\Recipient\Recipient
Résultat Message

jsonSerialize() public méthode

public jsonSerialize ( )

setCollapseKey() public méthode

See also: https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages
public setCollapseKey ( string $collapseKey ) : Message
$collapseKey string
Résultat Message

setContentAvailable() public méthode

See also: https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages
public setContentAvailable ( ) : Message
Résultat Message

setData() public méthode

public setData ( array $data )
$data array

setDelayWhileIdle() public méthode

See also: https://firebase.google.com/docs/cloud-messaging/concept-options#lifetime
public setDelayWhileIdle ( boolean $delayWhileIdle ) : Message
$delayWhileIdle boolean
Résultat Message

setNotification() public méthode

public setNotification ( Notification $notification )
$notification Notification

setPriority() public méthode

normal or high, use class constants as value
See also: https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message
public setPriority ( string $priority ) : Message
$priority string use the class constants
Résultat Message

setTimeToLive() public méthode

See also: https://firebase.google.com/docs/cloud-messaging/concept-options#ttl
public setTimeToLive ( integer $ttl ) : Message
$ttl integer
Résultat Message