Files
faveo/vendor/brozot/laravel-fcm/src/Request/GroupRequest.php
Sujit Prasad ffa56a43cb update v1.0.7.9 R.C.
This is a Release Candidate. We are still testing.
2016-08-03 20:04:36 +05:30

66 lines
1.2 KiB
PHP

<?php namespace LaravelFCM\Request;
/**
* Class GroupRequest
*
* @package LaravelFCM\Request
*/
class GroupRequest extends BaseRequest{
/**
* @internal
* @var string
*/
protected $operation;
/**
* @internal
* @var string
*/
protected $notificationKeyName;
/**
* @internal
* @var string
*/
protected $notificationKey;
/**
* @internal
* @var array
*/
protected $registrationIds;
/**
* GroupRequest constructor.
*
* @param $operation
* @param $notificationKeyName
* @param $notificationKey
* @param $registrationIds
*/
public function __construct($operation, $notificationKeyName, $notificationKey, $registrationIds)
{
parent::__construct();
$this->operation = $operation;
$this->notificationKeyName = $notificationKeyName;
$this->notificationKey = $notificationKey;
$this->registrationIds = $registrationIds;
}
/**
* Build the header for the request
*
* @return array
*/
protected function buildBody()
{
return [
'operation' => $this->operation,
'notification_key_name' => $this->notificationKeyName,
'notification_key' => $this->notificationKey,
'registration_ids' => $this->registrationIds
];
}
}