PHP Класс LaravelFCM\Message\OptionsBuilder

Class OptionsBuilder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$collapseKey string
$contentAvailable boolean
$delayWhileIdle boolean
$dryRun boolean
$priority string
$restrictedPackageName string
$timeToLive string

Открытые методы

Метод Описание
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

Описание методов

build() публичный Метод

build an instance of Options
public build ( ) : Options
Результат Options

getCollapseKey() публичный Метод

Get the collapseKey
public getCollapseKey ( ) : null | string
Результат null | string

getPriority() публичный Метод

Get the priority
public getPriority ( ) : null | string
Результат null | string

getRestrictedPackageName() публичный Метод

get restricted package name
public getRestrictedPackageName ( ) : null | string
Результат null | string

getTimeToLive() публичный Метод

get time to live
public getTimeToLive ( ) : null | integer
Результат null | integer

isContentAvailable() публичный Метод

is content available
public isContentAvailable ( ) : boolean
Результат boolean

isDelayWhileIdle() публичный Метод

is delay white idle
public isDelayWhileIdle ( ) : boolean
Результат boolean

isDryRun() публичный Метод

is dry run
public isDryRun ( ) : boolean
Результат boolean

setCollapseKey() публичный Метод

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
Результат OptionsBuilder

setContentAvailable() публичный Метод

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
Результат OptionsBuilder

setDelayWhileIdle() публичный Метод

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
Результат OptionsBuilder

setDryRun() публичный Метод

It should only be used for the development
public setDryRun ( boolean $isDryRun ) : OptionsBuilder
$isDryRun boolean
Результат OptionsBuilder

setPriority() публичный Метод

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
Результат OptionsBuilder

setRestrictedPackageName() публичный Метод

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
Результат OptionsBuilder

setTimeToLive() публичный Метод

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
Результат OptionsBuilder

Описание свойств

$collapseKey защищенное свойство

protected string $collapseKey
Результат string

$contentAvailable защищенное свойство

protected bool $contentAvailable
Результат boolean

$delayWhileIdle защищенное свойство

protected bool $delayWhileIdle
Результат boolean

$dryRun защищенное свойство

protected bool $dryRun
Результат boolean

$priority защищенное свойство

protected string $priority
Результат string

$restrictedPackageName защищенное свойство

protected string $restrictedPackageName
Результат string

$timeToLive защищенное свойство

protected string $timeToLive
Результат string