PHP Class LaravelFCM\Sender\FCMGroup

Inheritance: extends HTTPSender
Show file Open project: brozot/laravel-fcm

Public Methods

Method Description
addToGroup ( $notificationKeyName, $notificationKey, array $registrationIds ) : null add registrationId to a existing group
createGroup ( $notificationKeyName, array $registrationIds ) : null Create a group
isValidResponse ( Response $response ) : boolean
removeFromGroup ( $notificationKeyName, $notificationKey, array $registeredIds ) : null remove registrationId to a existing group

Private Methods

Method Description
getNotificationToken ( Response $response ) : null

Method Details

addToGroup() public method

add registrationId to a existing group
public addToGroup ( $notificationKeyName, $notificationKey, array $registrationIds ) : null
$notificationKeyName
$notificationKey
$registrationIds array registrationIds to add
return null

createGroup() public method

Create a group
public createGroup ( $notificationKeyName, array $registrationIds ) : null
$notificationKeyName
$registrationIds array
return null

isValidResponse() public method

public isValidResponse ( Response $response ) : boolean
$response GuzzleHttp\Psr7\Response
return boolean

removeFromGroup() public method

>Note: if you remove all registrationIds the group is automatically deleted
public removeFromGroup ( $notificationKeyName, $notificationKey, array $registeredIds ) : null
$notificationKeyName
$notificationKey
$registeredIds array registrationIds to remove
return null