PHP Класс LaravelFCM\Message\PayloadNotificationBuilder

Official google documentation :
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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

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

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

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

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

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

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

Build an PayloadNotification
public build ( ) : PayloadNotification
Результат PayloadNotification

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

Get Badge
public getBadge ( ) : null | String
Результат null | String

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

Get body
public getBody ( ) : null | String
Результат null | String

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

Get BodyLocationArgs
public getBodyLocationArgs ( ) : null | String | array
Результат null | String | array

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

Get BodyLocationKey
public getBodyLocationKey ( ) : null | String
Результат null | String

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

Get ClickAction
public getClickAction ( ) : null | String
Результат null | String

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

Get Color
public getColor ( ) : null | String
Результат null | String

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

Get Icon
public getIcon ( ) : null | String
Результат null | String

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

Get Sound
public getSound ( ) : null | String
Результат null | String

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

Get Tag
public getTag ( ) : null | String
Результат null | String

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

Get title
public getTitle ( ) : null | String
Результат null | String

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

GetTitleLocationArgs
public getTitleLocationArgs ( ) : null | String | array
Результат null | String | array

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

Get TitleLocationKey
public getTitleLocationKey ( ) : string
Результат string

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

Indicates the badge on the client app home icon.
public setBadge ( String $badge ) : PayloadNotificationBuilder
$badge String
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates notification body text.
public setBody ( String $body ) : PayloadNotificationBuilder
$body String
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates the string value to replace format specifiers in the body string for localization.
public setBodyLocationArgs ( mixed $bodyArgs ) : PayloadNotificationBuilder
$bodyArgs mixed
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates the key to the body string for localization.
public setBodyLocationKey ( String $bodyKey ) : PayloadNotificationBuilder
$bodyKey String
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates the action associated with a user click on the notification
public setClickAction ( String $action ) : PayloadNotificationBuilder
$action String
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates color of the icon, expressed in #rrggbb format
public setColor ( String $color ) : PayloadNotificationBuilder
$color String
Результат PayloadNotificationBuilder current instance of the builder

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

Supported Android Indicates notification icon. example : Sets value to myicon for drawable resource myicon.
public setIcon ( String $icon ) : PayloadNotificationBuilder
$icon String
Результат PayloadNotificationBuilder current instance of the builder

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

Supports default or the filename of a sound resource bundled in the app.
public setSound ( String $sound ) : PayloadNotificationBuilder
$sound String
Результат PayloadNotificationBuilder current instance of the builder

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

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
Результат PayloadNotificationBuilder current instance of the builder

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

but it is required for android
public setTitle ( String $title ) : PayloadNotificationBuilder
$title String
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates the string value to replace format specifiers in the title string for localization.
public setTitleLocationArgs ( mixed $titleArgs ) : PayloadNotificationBuilder
$titleArgs mixed
Результат PayloadNotificationBuilder current instance of the builder

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

Indicates the key to the title string for localization.
public setTitleLocationKey ( String $titleKey ) : PayloadNotificationBuilder
$titleKey String
Результат PayloadNotificationBuilder current instance of the builder

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

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

protected null|String $badge
Результат null | String

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

protected null|String $body
Результат null | String

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

protected null|String $bodyLocationArgs
Результат null | String

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

protected null|String $bodyLocationKey
Результат null | String

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

protected null|String $clickAction
Результат null | String

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

protected null|String $color
Результат null | String

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

protected null|String $icon
Результат null | String

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

protected null|String $sound
Результат null | String

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

protected null|String $tag
Результат null | String

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

protected null|String $title
Результат null | String

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

protected null|String $titleLocationArgs
Результат null | String

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

protected null|String $titleLocationKey
Результат null | String