PHP Class Endroid\Gcm\Client

Afficher le fichier Open project: endroid/gcm Class Usage Examples

Protected Properties

Свойство Type Description
$apiKey string
$apiUrl string
$browser Buzz\Browser
$client Buzz\Client\MultiCurl
$registrationIdMaxCount string
$responses Buzz\Message\Response[]

Méthodes publiques

Méthode Description
__construct ( $apiKey, null $apiUrl = null ) Class constructor.
getResponses ( ) : Buzz\Message\Response[] Returns the responses.
send ( mixed $data, array $registrationIds = [], array $options = [] ) : boolean Sends the message via the GCM server.
sendTo ( mixed $data, string $topic = '/topics/global', array $options = [] ) : boolean Sends the data to the given registration token, notification key, or topic via the GCM server.

Méthodes protégées

Méthode Description
getHeaders ( ) : array Returns the headers.

Method Details

__construct() public méthode

Class constructor.
public __construct ( $apiKey, null $apiUrl = null )
$apiKey
$apiUrl null

getHeaders() protected méthode

Returns the headers.
protected getHeaders ( ) : array
Résultat array

getResponses() public méthode

Returns the responses.
public getResponses ( ) : Buzz\Message\Response[]
Résultat Buzz\Message\Response[]

send() public méthode

Sends the message via the GCM server.
public send ( mixed $data, array $registrationIds = [], array $options = [] ) : boolean
$data mixed
$registrationIds array
$options array
Résultat boolean

sendTo() public méthode

Sends the data to the given registration token, notification key, or topic via the GCM server.
public sendTo ( mixed $data, string $topic = '/topics/global', array $options = [] ) : boolean
$data mixed
$topic string The value must be a registration token, notification key, or topic. Default global topic.
$options array to add along with message, such as collapse_key, time_to_live, delay_while_idle
Résultat boolean

Property Details

$apiKey protected_oe property

protected string $apiKey
Résultat string

$apiUrl protected_oe property

protected string $apiUrl
Résultat string

$browser protected_oe property

protected Browser,Buzz $browser
Résultat Buzz\Browser

$client protected_oe property

protected MultiCurl,Buzz\Client $client
Résultat Buzz\Client\MultiCurl

$registrationIdMaxCount protected_oe property

protected string $registrationIdMaxCount
Résultat string

$responses protected_oe property

protected Response[],Buzz\Message $responses
Résultat Buzz\Message\Response[]