Skip to content

Instantly share code, notes, and snippets.

@hnq90
Created October 2, 2014 03:54
Show Gist options
  • Save hnq90/86d9a62e950935559e5f to your computer and use it in GitHub Desktop.
Save hnq90/86d9a62e950935559e5f to your computer and use it in GitHub Desktop.
PushNotificationInterface
<?php
interface PushNotificationInterface
{
/**
* @param string $device_token Device Token
* @param string $text Content of notification
* @param array $options Options of push notification
*
* @return bool Push notification successfully or failed
* @throws ApnsPHP_Exception
* @throws ApnsPHP_Message_Exception
* @throws ApnsPHP_Push_Exception
* @throws Exception
*
* @author HuyNQ <[email protected]>
* @version 1.0
*/
public function pushOnce($device_token, $text, $options = []);
/**
* Push notification to many devices at once
*
* @param array $lists List of device token and content
* @param array $options Options of push notification
*
* @return bool Push notification successfully or failed
* @throws ApnsPHP_Exception
* @throws ApnsPHP_Message_Exception
* @throws ApnsPHP_Push_Exception
* @throws Exception
*
* @author HuyNQ <[email protected]>
* @version 1.0
*/
public function pushMany($lists, $options = []);
/**
* Get list feedback from Apple server
*
* @return array Array of Device Token from Apple Server
* @throws ApnsPHP_Exception
* @throws Exception
*
* @author HuyNQ <[email protected]>
* @version 1.0
*/
public function getFeedback();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment