PHP Class LaravelFCM\Message\OptionsBuilder

Class OptionsBuilder
Afficher le fichier Open project: brozot/laravel-fcm Class Usage Examples

Protected Properties

Свойство Type Description
$collapseKey string
$contentAvailable boolean
$delayWhileIdle boolean
$dryRun boolean
$priority string
$restrictedPackageName string
$timeToLive string

Méthodes publiques

Méthode Description
build ( ) : Options build an instance of Options
getCollapseKey ( ) : null | string Get the collapseKey
getPriority ( ) : null | string Get the priority
getRestrictedPackageName ( ) : null | string get restricted package name
getTimeToLive ( ) : null | integer get time to live
isContentAvailable ( ) : boolean is content available
isDelayWhileIdle ( ) : boolean is delay white idle
isDryRun ( ) : boolean is dry run
setCollapseKey ( String $collapseKey ) : OptionsBuilder This parameter identifies a group of messages A maximum of 4 different collapse keys is allowed at any given time.
setContentAvailable ( boolean $contentAvailable ) : OptionsBuilder support only Android and Ios
setDelayWhileIdle ( boolean $delayWhileIdle ) : OptionsBuilder When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.
setDryRun ( boolean $isDryRun ) : OptionsBuilder This parameter, when set to true, allows developers to test a request without actually sending a message.
setPriority ( String $priority ) : OptionsBuilder Sets the priority of the message. Valid values are "normal" and "high." By default, messages are sent with normal priority
setRestrictedPackageName ( string $restrictedPackageName ) : OptionsBuilder This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
setTimeToLive ( integer $timeToLive ) : OptionsBuilder This parameter specifies how long the message should be kept in FCM storage if the device is offline

Method Details

build() public méthode

build an instance of Options
public build ( ) : Options
Résultat Options

getCollapseKey() public méthode

Get the collapseKey
public getCollapseKey ( ) : null | string
Résultat null | string

getPriority() public méthode

Get the priority
public getPriority ( ) : null | string
Résultat null | string

getRestrictedPackageName() public méthode

get restricted package name
public getRestrictedPackageName ( ) : null | string
Résultat null | string

getTimeToLive() public méthode

get time to live
public getTimeToLive ( ) : null | integer
Résultat null | integer

isContentAvailable() public méthode

is content available
public isContentAvailable ( ) : boolean
Résultat boolean

isDelayWhileIdle() public méthode

is delay white idle
public isDelayWhileIdle ( ) : boolean
Résultat boolean

isDryRun() public méthode

is dry run
public isDryRun ( ) : boolean
Résultat boolean

setCollapseKey() public méthode

This parameter identifies a group of messages A maximum of 4 different collapse keys is allowed at any given time.
public setCollapseKey ( String $collapseKey ) : OptionsBuilder
$collapseKey String
Résultat OptionsBuilder

setContentAvailable() public méthode

An inactive client app is awoken. On iOS, use this field to represent content-available in the APNS payload. On Android, data messages wake the app by default. On Chrome, currently not supported.
public setContentAvailable ( boolean $contentAvailable ) : OptionsBuilder
$contentAvailable boolean
Résultat OptionsBuilder

setDelayWhileIdle() public méthode

When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.
public setDelayWhileIdle ( boolean $delayWhileIdle ) : OptionsBuilder
$delayWhileIdle boolean
Résultat OptionsBuilder

setDryRun() public méthode

It should only be used for the development
public setDryRun ( boolean $isDryRun ) : OptionsBuilder
$isDryRun boolean
Résultat OptionsBuilder

setPriority() public méthode

Sets the priority of the message. Valid values are "normal" and "high." By default, messages are sent with normal priority
public setPriority ( String $priority ) : OptionsBuilder
$priority String
Résultat OptionsBuilder

setRestrictedPackageName() public méthode

This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
public setRestrictedPackageName ( string $restrictedPackageName ) : OptionsBuilder
$restrictedPackageName string
Résultat OptionsBuilder

setTimeToLive() public méthode

This parameter specifies how long the message should be kept in FCM storage if the device is offline
public setTimeToLive ( integer $timeToLive ) : OptionsBuilder
$timeToLive integer (in second) min:0 max:2419200
Résultat OptionsBuilder

Property Details

$collapseKey protected_oe property

protected string $collapseKey
Résultat string

$contentAvailable protected_oe property

protected bool $contentAvailable
Résultat boolean

$delayWhileIdle protected_oe property

protected bool $delayWhileIdle
Résultat boolean

$dryRun protected_oe property

protected bool $dryRun
Résultat boolean

$priority protected_oe property

protected string $priority
Résultat string

$restrictedPackageName protected_oe property

protected string $restrictedPackageName
Résultat string

$timeToLive protected_oe property

protected string $timeToLive
Résultat string