CaMykS  1.0-20231201
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PushNotification Class Reference

Public Member Functions

 __construct ($params=array())
 
 send ($params=array())
 
 send_toIOsDevice ($params=array())
 
 send_toAndroidDevice ($params=array())
 
 send_toWindowsPhoneDevice ($params=array())
 
 get_lastErrorCode ()
 
 get_lastErrorMessage ()
 

Private Member Functions

 _send_usingCurl ($url, $headers, $fields)
 
 _define_error ($error=0, $detail='')
 

Private Attributes

 $params
 Notification parameters. More...
 
 $_lastError = 0
 Last error code. More...
 
 $_lastErrorDetail
 Last error description. More...
 

Detailed Description

PushNotification class.

Author
CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

PushNotification::__construct (   $params = array())

Class constructor.

Parameters
array$params
Returns
void

Member Function Documentation

◆ send()

PushNotification::send (   $params = array())

Send notification.

Parameters
array$params
Returns
boolean result

◆ send_toIOsDevice()

PushNotification::send_toIOsDevice (   $params = array())

Send notification to iOS device.

Parameters
array$params
Returns
boolean result

◆ send_toAndroidDevice()

PushNotification::send_toAndroidDevice (   $params = array())

Send notification to Android device.

Parameters
array$params
Returns
boolean result

◆ send_toWindowsPhoneDevice()

PushNotification::send_toWindowsPhoneDevice (   $params = array())

send notification to Windows Phone device

Parameters
array$params
Returns
boolean result

◆ get_lastErrorCode()

PushNotification::get_lastErrorCode ( )

Return last error code.

Returns
integer

◆ get_lastErrorMessage()

PushNotification::get_lastErrorMessage ( )

Return last error message.

Returns
string

◆ _send_usingCurl()

PushNotification::_send_usingCurl (   $url,
  $headers,
  $fields 
)
private

Send notification through curl

Parameters
string$url
array$headers
array$fields
Returns
boolean result

◆ _define_error()

PushNotification::_define_error (   $error = 0,
  $detail = '' 
)
private

Define last error.

Parameters
integer$error
string$detail
Returns
void

Member Data Documentation

◆ $params

array PushNotification::$params
private
Initial value:
= array(
'devicePlatform' => 0,
'deviceIdentifier' => '',
'title' => '',
'message' => '',
'badge' => 0,
'sound' => 'default',
'vibrate' => 1,
'delay' => 2,
'customActionButton' => '',
'privateAppData' => array(),
'APIAccessKey' => '',
'mode' => '',
'certificateLocation' => '',
'certificatePassphrase' => '',
)

Notification parameters.

◆ $_lastError

integer PushNotification::$_lastError = 0
private

Last error code.

◆ $_lastErrorDetail

string PushNotification::$_lastErrorDetail
private

Last error description.


The documentation for this class was generated from the following file: