Parse PHP SDK API Reference

ParsePush
in package

Class ParsePush - Handles sending push notifications with Parse.

Tags
author

Fosco Marotto [email protected]

Table of Contents

getStatus()  : null|ParsePushStatus
Returns the PushStatus for a response from ParsePush::send
hasStatus()  : bool
Returns whether or not the given response has a push status Checks to see if X-Push-Status-Id is present in $response
send()  : mixed
Sends a push notification.

Methods

getStatus()

Returns the PushStatus for a response from ParsePush::send

public static getStatus(array<string|int, mixed> $response) : null|ParsePushStatus
Parameters
$response : array<string|int, mixed>

Response from ParsePush::send

Return values
null|ParsePushStatus

hasStatus()

Returns whether or not the given response has a push status Checks to see if X-Push-Status-Id is present in $response

public static hasStatus(array<string|int, mixed> $response) : bool
Parameters
$response : array<string|int, mixed>

Response from ParsePush::send

Return values
bool

send()

Sends a push notification.

public static send(array<string|int, mixed> $data[, bool $useMasterKey = false ]) : mixed
Parameters
$data : array<string|int, mixed>

The data of the push notification. Valid fields are: channels - An Array of channels to push to. push_time - A Date object for when to send the push. expiration_time - A Date object for when to expire the push. expiration_interval - The seconds from now to expire the push. where - A ParseQuery over ParseInstallation that is used to match a set of installations to push to. data - The data to send as part of the push

$useMasterKey : bool = false

Whether to use the Master Key for the request

Tags
throws
Exception

ParseException

Return values
mixed

Search results