PHP Class RMS\PushNotificationsBundle\Service\OS\AndroidGCMNotification

Inheritance: implements RMS\PushNotificationsBundle\Service\OS\OSNotificationServiceInterface
Show file Open project: richsage/RMSPushNotificationsBundle Class Usage Examples

Protected Properties

Property Type Description
$apiKey string Google GCM API key
$apiURL string GCM endpoint
$browser Buzz\Browser Browser object
$logger Psr\Log\LoggerInterface Monolog logger
$registrationIdMaxCount integer Max registration count
$responses array Collection of the responses from the GCM communication
$useDryRun boolean Whether or not to use the dry run GCM

Public Methods

Method Description
__construct ( string $apiKey, boolean $useMultiCurl, integer $timeout, Psr\Log\LoggerInterface $logger, Buzz\Client\AbstractCurl $client = null, boolean $dryRun = false ) Constructor
getResponses ( ) : array Returns responses
send ( RMS\PushNotificationsBundle\Message\MessageInterface $message ) : boolean Sends the data to the given registration IDs via the GCM server

Method Details

__construct() public method

Constructor
public __construct ( string $apiKey, boolean $useMultiCurl, integer $timeout, Psr\Log\LoggerInterface $logger, Buzz\Client\AbstractCurl $client = null, boolean $dryRun = false )
$apiKey string
$useMultiCurl boolean
$timeout integer
$logger Psr\Log\LoggerInterface
$client Buzz\Client\AbstractCurl (optional)
$dryRun boolean

getResponses() public method

Returns responses
public getResponses ( ) : array
return array

send() public method

Sends the data to the given registration IDs via the GCM server
public send ( RMS\PushNotificationsBundle\Message\MessageInterface $message ) : boolean
$message RMS\PushNotificationsBundle\Message\MessageInterface
return boolean

Property Details

$apiKey protected property

Google GCM API key
protected string $apiKey
return string

$apiURL protected property

GCM endpoint
protected string $apiURL
return string

$browser protected property

Browser object
protected Browser,Buzz $browser
return Buzz\Browser

$logger protected property

Monolog logger
protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$registrationIdMaxCount protected property

Max registration count
protected int $registrationIdMaxCount
return integer

$responses protected property

Collection of the responses from the GCM communication
protected array $responses
return array

$useDryRun protected property

Whether or not to use the dry run GCM
protected bool $useDryRun
return boolean