프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$apiKey |
메소드 | 설명 | |
---|---|---|
__call ( $method, $params ) | ||
getClient ( ) | ||
init ( ) | ||
send ( string $token, $text, array $payloadData = [], array $args = [] ) : null | PHP_GCM\Message | send a push notification for android using GCM client | |
sendMulti ( string | array $tokens, $text, array $payloadData = [], array $args = [] ) : null | PHP_GCM\Message | send a push notification for android using GCM client |
$this->send(
'some-valid-token',
'some-message',
[
'custom_data_key_1'=>'custom_data_value_1',
'custom_data_key_2'=>'custom_data_value_2',
]
);
$this->sendMulti(
'some-valid-token',
'some-message',
[
'custom_data_key_1' => 'custom_data_value_1',
'custom_data_key_2' => 'custom_data_value_2',
]
);
Usage 2:
$this->sendMulti(
['valid-token-1','valid-token-2','valid-token-3'],
'some-message',
[
'custom_data_key_1'=>'custom_data_value_1',
'custom_data_key_2'=>'custom_data_value_2',
]
);