Méthode |
Description |
|
__construct ( $numberSuccess ) |
DownstreamResponse constructor. |
|
addTokenToDelete ( $token ) |
Add a token to delete |
|
addTokenToModify ( $oldToken, $newToken ) |
Add a token to modify |
|
addTokenToRetry ( $token ) |
Add a token to retry |
|
addTokenWithError ( $token, $message ) |
Add a token to errors |
|
hasMissingToken ( ) : boolean |
check if missing tokens was given to the request
If true, remove all the empty token in your database |
|
merge ( DownstreamResponse $response ) |
Not using it |
|
numberFailure ( ) : integer |
Get the number of device which thrown an error |
|
numberModification ( ) : integer |
Get the number of device that you need to modify their token |
|
numberSuccess ( ) : integer |
Get the number of device reached with success + numberTokenToModify |
|
setMissingToken ( $hasMissingToken ) |
change missing token state |
|
tokensToDelete ( ) : array |
get token to delete
remove all tokens returned by this method in your database |
|
tokensToModify ( ) : array |
get token to modify
key: oldToken
value: new token
find the old token in your database and replace it with the new one |
|
tokensToRetry ( ) : array |
Get tokens that you should resend using exponential backoof |
|
tokensWithError ( ) : array |
Get tokens that thrown an error
key : token
value : error
In production, remove these tokens from you database |
|