You are here

private function PushNotificationsBroadcasterApns::determineGateway in Push Notifications 8

Determine the correct gateway.

1 call to PushNotificationsBroadcasterApns::determineGateway()
PushNotificationsBroadcasterApns::__construct in src/PushNotificationsBroadcasterApns.php
Constructor.

File

src/PushNotificationsBroadcasterApns.php, line 122
Contains \Drupal\push_notifications\PushNotificationsBroadcasterApns.

Class

PushNotificationsBroadcasterApns
Broadcasts Android messages.

Namespace

Drupal\push_notifications

Code

private function determineGateway() {
  switch ($this->config
    ->get('environment')) {
    case 'development':
      $this->gateway = 'gateway.sandbox.push.apple.com';
      break;
    case 'production':
      $this->gateway = 'gateway.push.apple.com';
      break;
  }
}