Message implements JsonSerializable
Data-class represents push-notification from backend to mobile app.
Table of Contents
Interfaces
- JsonSerializable
Methods
- __construct() : mixed
- createWithPayload() : Message
- Static constructor for silent push-messages with payload only.
- getBody() : string
- getId() : string
- getPayload() : array<string|int, mixed>
- getTitle() : string
- getType() : string
- jsonSerialize() : array<string|int, mixed>
Methods
__construct()
public
__construct(string $type[, string $title = '' ][, string $body = '' ][, array<string|int, mixed> $payload = [] ]) : mixed
Parameters
- $type : string
- $title : string = ''
- $body : string = ''
- $payload : array<string|int, mixed> = []
createWithPayload()
Static constructor for silent push-messages with payload only.
public
static createWithPayload(string $type, array<string|int, mixed> $payload) : Message
Parameters
- $type : string
- $payload : array<string|int, mixed>
Return values
MessagegetBody()
public
getBody() : string
Return values
stringgetId()
public
getId() : string
Return values
stringgetPayload()
public
getPayload() : array<string|int, mixed>
Return values
array<string|int, mixed>getTitle()
public
getTitle() : string
Return values
stringgetType()
public
getType() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>