TokenMessage
extends Message
in package
Message that is sent to a specific token.
Table of Contents
Properties
Methods
- __construct() : mixed
- getId() : int
- Get the id of this message.
- getToken() : string
- Returns the registration token.
- toArray() : array<string|int, mixed>
- Returns the message as an array in the format as expected by the Google API.
Properties
$body
private
string
$body
$id
private
int
$id
$title
private
string
$title
$token
private
string
$token
Methods
__construct()
public
__construct(int $id, string $token, string $body, string $title) : mixed
Parameters
- $id : int
-
A unique identifier for this message, for example use a primary key from your database.
- $token : string
-
The registration token.
- $body : string
-
The message body content.
- $title : string
-
The message title.
getId()
Get the id of this message.
public
getId() : int
Return values
intgetToken()
Returns the registration token.
public
getToken() : string
Return values
stringtoArray()
Returns the message as an array in the format as expected by the Google API.
public
toArray() : array<string|int, mixed>