PHP Class paragraph1\phpFCM\Client

Author: palbertini
Inheritance: implements paragraph1\phpFCM\ClientInterface
Afficher le fichier Open project: paragraph1/php-fcm Class Usage Examples

Méthodes publiques

Méthode Description
injectHttpClient ( GuzzleHttp\ClientInterface $client )
send ( Message $message ) : Psr\Http\Message\ResponseInterface sends your notification to the google servers and returns a guzzle repsonse object containing their answer.
setApiKey ( string $apiKey ) : Client add your server api key here read how to obtain an api key here: https://firebase.google.com/docs/server/setup#prerequisites
setProxyApiUrl ( string $url ) : Client people can overwrite the api url with a proxy server url of their own

Private Methods

Méthode Description
getApiUrl ( )

Method Details

injectHttpClient() public méthode

public injectHttpClient ( GuzzleHttp\ClientInterface $client )
$client GuzzleHttp\ClientInterface

send() public méthode

sends your notification to the google servers and returns a guzzle repsonse object containing their answer.
public send ( Message $message ) : Psr\Http\Message\ResponseInterface
$message Message
Résultat Psr\Http\Message\ResponseInterface

setApiKey() public méthode

add your server api key here read how to obtain an api key here: https://firebase.google.com/docs/server/setup#prerequisites
public setApiKey ( string $apiKey ) : Client
$apiKey string
Résultat Client

setProxyApiUrl() public méthode

people can overwrite the api url with a proxy server url of their own
public setProxyApiUrl ( string $url ) : Client
$url string
Résultat Client