PHP Class App\Ninja\Notifications\PushFactory

Show file Open project: hillelcoren/invoice-ninja Class Usage Examples

Public Methods

Method Description
__construct ( ) PushFactory constructor.
customMessage ( $token, $message, $messageArray ) : void customMessage function
getFeedback ( string $token, string $message = '' ) : array getFeedback function
message ( $token, $message ) : void message function

Method Details

__construct() public method

PushFactory constructor.
public __construct ( )

customMessage() public method

Send a message with a nested custom payload to perform additional trickery within application
public customMessage ( $token, $message, $messageArray ) : void
$token
$message
$messageArray
return void

getFeedback() public method

Returns an array of expired/invalid tokens to be removed from iOS PUSH notifications. We need to run this once ~ 24hrs
public getFeedback ( string $token, string $message = '' ) : array
$token string - A valid token (can be any valid token)
$message string - Nil value for message
return array

message() public method

Send a plain text only message to a single device.
public message ( $token, $message ) : void
$token - device token
$message - user specific message
return void