CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
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

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

Class constructor.

Parameters
array$params
Returns
void

Member Function Documentation

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

Define last error.

Parameters
integer$error
string$detail
Returns
void
PushNotification::_send_usingCurl (   $url,
  $headers,
  $fields 
)
private

Send notification through curl

Parameters
string$url
array$headers
array$fields
Returns
boolean result
PushNotification::get_lastErrorCode ( )

Return last error code.

Returns
integer
PushNotification::get_lastErrorMessage ( )

Return last error message.

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

Send notification.

Parameters
array$params
Returns
boolean result
PushNotification::send_toAndroidDevice (   $params = array())

Send notification to Android device.

Parameters
array$params
Returns
boolean result
PushNotification::send_toIOsDevice (   $params = array())

Send notification to iOS device.

Parameters
array$params
Returns
boolean result
PushNotification::send_toWindowsPhoneDevice (   $params = array())

send notification to Windows Phone device

Parameters
array$params
Returns
boolean result

Member Data Documentation

integer PushNotification::$_lastError = 0
private

Last error code.

string PushNotification::$_lastErrorDetail
private

Last error description.

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.


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