PHP Class LaravelFCM\Message\PayloadNotificationBuilder

Official google documentation :
Afficher le fichier Open project: brozot/laravel-fcm Class Usage Examples

Protected Properties

Свойство Type Description
$badge null | String
$body null | String
$bodyLocationArgs null | String
$bodyLocationKey null | String
$clickAction null | String
$color null | String
$icon null | String
$sound null | String
$tag null | String
$title null | String
$titleLocationArgs null | String
$titleLocationKey null | String

Méthodes publiques

Méthode Description
__construct ( String $title = null ) Title must be present on android notification and ios (watch) notification
build ( ) : PayloadNotification Build an PayloadNotification
getBadge ( ) : null | String Get Badge
getBody ( ) : null | String Get body
getBodyLocationArgs ( ) : null | String | array Get BodyLocationArgs
getBodyLocationKey ( ) : null | String Get BodyLocationKey
getClickAction ( ) : null | String Get ClickAction
getColor ( ) : null | String Get Color
getIcon ( ) : null | String Get Icon
getSound ( ) : null | String Get Sound
getTag ( ) : null | String Get Tag
getTitle ( ) : null | String Get title
getTitleLocationArgs ( ) : null | String | array GetTitleLocationArgs
getTitleLocationKey ( ) : string Get TitleLocationKey
setBadge ( String $badge ) : PayloadNotificationBuilder Supported Ios
setBody ( String $body ) : PayloadNotificationBuilder Indicates notification body text.
setBodyLocationArgs ( mixed $bodyArgs ) : PayloadNotificationBuilder Indicates the string value to replace format specifiers in the body string for localization.
setBodyLocationKey ( String $bodyKey ) : PayloadNotificationBuilder Indicates the key to the body string for localization.
setClickAction ( String $action ) : PayloadNotificationBuilder Indicates the action associated with a user click on the notification
setColor ( String $color ) : PayloadNotificationBuilder Supported Android
setIcon ( String $icon ) : PayloadNotificationBuilder Supported Android Indicates notification icon. example : Sets value to myicon for drawable resource myicon.
setSound ( String $sound ) : PayloadNotificationBuilder Indicates a sound to play when the device receives a notification.
setTag ( String $tag ) : PayloadNotificationBuilder Supported Android
setTitle ( String $title ) : PayloadNotificationBuilder Indicates notification title. This field is not visible on iOS phones and tablets.
setTitleLocationArgs ( mixed $titleArgs ) : PayloadNotificationBuilder Indicates the string value to replace format specifiers in the title string for localization.
setTitleLocationKey ( String $titleKey ) : PayloadNotificationBuilder Indicates the key to the title string for localization.

Method Details

__construct() public méthode

Title must be present on android notification and ios (watch) notification
public __construct ( String $title = null )
$title String

build() public méthode

Build an PayloadNotification
public build ( ) : PayloadNotification
Résultat PayloadNotification

getBadge() public méthode

Get Badge
public getBadge ( ) : null | String
Résultat null | String

getBody() public méthode

Get body
public getBody ( ) : null | String
Résultat null | String

getBodyLocationArgs() public méthode

Get BodyLocationArgs
public getBodyLocationArgs ( ) : null | String | array
Résultat null | String | array

getBodyLocationKey() public méthode

Get BodyLocationKey
public getBodyLocationKey ( ) : null | String
Résultat null | String

getClickAction() public méthode

Get ClickAction
public getClickAction ( ) : null | String
Résultat null | String

getColor() public méthode

Get Color
public getColor ( ) : null | String
Résultat null | String

getIcon() public méthode

Get Icon
public getIcon ( ) : null | String
Résultat null | String

getSound() public méthode

Get Sound
public getSound ( ) : null | String
Résultat null | String

getTag() public méthode

Get Tag
public getTag ( ) : null | String
Résultat null | String

getTitle() public méthode

Get title
public getTitle ( ) : null | String
Résultat null | String

getTitleLocationArgs() public méthode

GetTitleLocationArgs
public getTitleLocationArgs ( ) : null | String | array
Résultat null | String | array

getTitleLocationKey() public méthode

Get TitleLocationKey
public getTitleLocationKey ( ) : string
Résultat string

setBadge() public méthode

Indicates the badge on the client app home icon.
public setBadge ( String $badge ) : PayloadNotificationBuilder
$badge String
Résultat PayloadNotificationBuilder current instance of the builder

setBody() public méthode

Indicates notification body text.
public setBody ( String $body ) : PayloadNotificationBuilder
$body String
Résultat PayloadNotificationBuilder current instance of the builder

setBodyLocationArgs() public méthode

Indicates the string value to replace format specifiers in the body string for localization.
public setBodyLocationArgs ( mixed $bodyArgs ) : PayloadNotificationBuilder
$bodyArgs mixed
Résultat PayloadNotificationBuilder current instance of the builder

setBodyLocationKey() public méthode

Indicates the key to the body string for localization.
public setBodyLocationKey ( String $bodyKey ) : PayloadNotificationBuilder
$bodyKey String
Résultat PayloadNotificationBuilder current instance of the builder

setClickAction() public méthode

Indicates the action associated with a user click on the notification
public setClickAction ( String $action ) : PayloadNotificationBuilder
$action String
Résultat PayloadNotificationBuilder current instance of the builder

setColor() public méthode

Indicates color of the icon, expressed in #rrggbb format
public setColor ( String $color ) : PayloadNotificationBuilder
$color String
Résultat PayloadNotificationBuilder current instance of the builder

setIcon() public méthode

Supported Android Indicates notification icon. example : Sets value to myicon for drawable resource myicon.
public setIcon ( String $icon ) : PayloadNotificationBuilder
$icon String
Résultat PayloadNotificationBuilder current instance of the builder

setSound() public méthode

Supports default or the filename of a sound resource bundled in the app.
public setSound ( String $sound ) : PayloadNotificationBuilder
$sound String
Résultat PayloadNotificationBuilder current instance of the builder

setTag() public méthode

Indicates whether each notification results in a new entry in the notification drawer on Android. If not set, each request creates a new notification. If set, and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.
public setTag ( String $tag ) : PayloadNotificationBuilder
$tag String
Résultat PayloadNotificationBuilder current instance of the builder

setTitle() public méthode

but it is required for android
public setTitle ( String $title ) : PayloadNotificationBuilder
$title String
Résultat PayloadNotificationBuilder current instance of the builder

setTitleLocationArgs() public méthode

Indicates the string value to replace format specifiers in the title string for localization.
public setTitleLocationArgs ( mixed $titleArgs ) : PayloadNotificationBuilder
$titleArgs mixed
Résultat PayloadNotificationBuilder current instance of the builder

setTitleLocationKey() public méthode

Indicates the key to the title string for localization.
public setTitleLocationKey ( String $titleKey ) : PayloadNotificationBuilder
$titleKey String
Résultat PayloadNotificationBuilder current instance of the builder

Property Details

$badge protected_oe property

protected null|String $badge
Résultat null | String

$body protected_oe property

protected null|String $body
Résultat null | String

$bodyLocationArgs protected_oe property

protected null|String $bodyLocationArgs
Résultat null | String

$bodyLocationKey protected_oe property

protected null|String $bodyLocationKey
Résultat null | String

$clickAction protected_oe property

protected null|String $clickAction
Résultat null | String

$color protected_oe property

protected null|String $color
Résultat null | String

$icon protected_oe property

protected null|String $icon
Résultat null | String

$sound protected_oe property

protected null|String $sound
Résultat null | String

$tag protected_oe property

protected null|String $tag
Résultat null | String

$title protected_oe property

protected null|String $title
Résultat null | String

$titleLocationArgs protected_oe property

protected null|String $titleLocationArgs
Résultat null | String

$titleLocationKey protected_oe property

protected null|String $titleLocationKey
Résultat null | String