Documentation

TopicMessage extends Message
in package

Message that is sent to a specific topic.

Table of Contents

Properties

$body  : string
$id  : int
$title  : string
$topic  : string

Methods

__construct()  : mixed
getId()  : int
Get the id of this message.
getTopic()  : string
Returns the topic.
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 $topic, string $body, string $title) : mixed
Parameters
$id : int

A unique identifier for this message, for example use a primary key from your database.

$topic : string

The topic.

$body : string

The message body content.

$title : string

The message title.

getId()

Get the id of this message.

public getId() : int
Return values
int

getTopic()

Returns the topic.

public getTopic() : 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