Documentation

TokenMessage extends Message
in package

Message that is sent to a specific token.

Table of Contents

Properties

$body  : string
$id  : int
$title  : string
$token  : string

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

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
int

getToken()

Returns the registration token.

public getToken() : string
Return values
string

toArray()

Returns the message as an array in the format as expected by the Google API.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results