PHP Class paragraph1\phpFCM\Message

Author: palbertini
Inheritance: implements JsonSerializable
Datei anzeigen Open project: paragraph1/php-fcm Class Usage Examples

Public Methods

Method 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

Method Description
createTo ( array &$jsonData )

Method Details

addRecipient() public method

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

jsonSerialize() public method

public jsonSerialize ( )

setCollapseKey() public method

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

setContentAvailable() public method

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

setData() public method

public setData ( array $data )
$data array

setDelayWhileIdle() public method

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

setNotification() public method

public setNotification ( Notification $notification )
$notification Notification

setPriority() public method

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
return Message

setTimeToLive() public method

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