PHP Class LaravelFCM\Mocks\MockTopicResponse

Inheritance: implements LaravelFCM\Response\TopicResponseContract
Show file Open project: brozot/laravel-fcm

Protected Properties

Property Type Description
$error string
$messageId string
$needRetry boolean
$topic string

Public Methods

Method Description
error ( ) : string return error message you should test if it's necessary to resent it
isSuccess ( ) : boolean true if topic sent with success
setError ( $error ) set error
setSuccess ( $messageId ) if success set a message id
shouldRetry ( ) : boolean return true if it's necessary resent it using exponential backoff

Method Details

error() public method

return error message you should test if it's necessary to resent it
public error ( ) : string
return string error

isSuccess() public method

true if topic sent with success
public isSuccess ( ) : boolean
return boolean

setError() public method

set error
public setError ( $error )
$error

setSuccess() public method

if success set a message id
public setSuccess ( $messageId )
$messageId

shouldRetry() public method

return true if it's necessary resent it using exponential backoff
public shouldRetry ( ) : boolean
return boolean

Property Details

$error protected property

protected string $error
return string

$messageId protected property

protected string $messageId
return string

$needRetry protected property

protected bool $needRetry
return boolean

$topic protected property

protected string $topic
return string