You are here

public function FirebaseServiceBase::buildHeader in Firebase Push Notification (FCM) 8

Same name and namespace in other branches
  1. 3.0.x src/Service/FirebaseServiceBase.php \Drupal\firebase\Service\FirebaseServiceBase::buildHeader()

Build the header.

Return value

array Array with request header.

Overrides FirebaseServiceInterface::buildHeader

2 calls to FirebaseServiceBase::buildHeader()
FirebaseGroupManagerService::buildHeader in src/Service/FirebaseGroupManagerService.php
Build the header.
FirebaseServiceBase::send in src/Service/FirebaseServiceBase.php
1 method overrides FirebaseServiceBase::buildHeader()
FirebaseGroupManagerService::buildHeader in src/Service/FirebaseGroupManagerService.php
Build the header.

File

src/Service/FirebaseServiceBase.php, line 82

Class

FirebaseServiceBase
Provides a base class for service, working with FCM.

Namespace

Drupal\firebase\Service

Code

public function buildHeader() {
  return [
    'Content-Type' => 'application/json',
    'Authorization' => 'key=' . $this->key,
  ];
}