PHP Class LaravelFCM\Mocks\MockDownstreamResponse

Inheritance: implements LaravelFCM\Response\DownstreamResponseContract
Afficher le fichier Open project: brozot/laravel-fcm

Protected Properties

Свойство Type Description
$hasMissingToken boolean
$messageId
$numberTokensSuccess integer
$tokensToDelete array
$tokensToModify array
$tokensToRetry array
$tokensWithError array

Méthodes publiques

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

Method Details

__construct() public méthode

DownstreamResponse constructor.
public __construct ( $numberSuccess )
$numberSuccess

addTokenToDelete() public méthode

Add a token to delete
public addTokenToDelete ( $token )
$token

addTokenToModify() public méthode

Add a token to modify
public addTokenToModify ( $oldToken, $newToken )
$oldToken
$newToken

addTokenToRetry() public méthode

Add a token to retry
public addTokenToRetry ( $token )
$token

addTokenWithError() public méthode

Add a token to errors
public addTokenWithError ( $token, $message )
$token
$message

hasMissingToken() public méthode

check if missing tokens was given to the request If true, remove all the empty token in your database
public hasMissingToken ( ) : boolean
Résultat boolean

merge() public méthode

Not using it
public merge ( DownstreamResponse $response )
$response LaravelFCM\Response\DownstreamResponse

numberFailure() public méthode

Get the number of device which thrown an error
public numberFailure ( ) : integer
Résultat integer

numberModification() public méthode

Get the number of device that you need to modify their token
public numberModification ( ) : integer
Résultat integer

numberSuccess() public méthode

Get the number of device reached with success + numberTokenToModify
public numberSuccess ( ) : integer
Résultat integer

setMissingToken() public méthode

change missing token state
public setMissingToken ( $hasMissingToken )
$hasMissingToken

tokensToDelete() public méthode

get token to delete remove all tokens returned by this method in your database
public tokensToDelete ( ) : array
Résultat array

tokensToModify() public méthode

get token to modify key: oldToken value: new token find the old token in your database and replace it with the new one
public tokensToModify ( ) : array
Résultat array

tokensToRetry() public méthode

Get tokens that you should resend using exponential backoof
public tokensToRetry ( ) : array
Résultat array

tokensWithError() public méthode

Get tokens that thrown an error key : token value : error In production, remove these tokens from you database
public tokensWithError ( ) : array
Résultat array

Property Details

$hasMissingToken protected_oe property

protected bool $hasMissingToken
Résultat boolean

$messageId protected_oe property

protected $messageId

$numberTokensSuccess protected_oe property

protected int $numberTokensSuccess
Résultat integer

$tokensToDelete protected_oe property

protected array $tokensToDelete
Résultat array

$tokensToModify protected_oe property

protected array $tokensToModify
Résultat array

$tokensToRetry protected_oe property

protected array $tokensToRetry
Résultat array

$tokensWithError protected_oe property

protected array $tokensWithError
Résultat array