public function addDeviceToGroup($senderId, $notificationKeyName, $notificationKey, array $registrationIds) {
    if (empty($notificationKey)) {
      throw new \InvalidArgumentException('notificationKey cannot be empty');
    }

    return $this->performDeviceGroupOperation($senderId, $notificationKeyName, $notificationKey, $registrationIds, self::DEVICE_GROUP_ADD);
  }
public function addDeviceToGroup($senderId, $notificationKeyName, $notificationKey, array $registrationIds) {
    if (empty($notificationKey)) {
      throw new \InvalidArgumentException('notificationKey cannot be empty');
    }

    return $this->performDeviceGroupOperation($senderId, $notificationKeyName, $notificationKey, $registrationIds, self::DEVICE_GROUP_ADD);
  }
public function addDeviceToGroup ( $ senderId , $ notificationKeyName , $ notificationKey , array $ registrationIds ) { if ( empty ( $ notificationKey ) ) { throw new \ InvalidArgumentException ( 'notificationKey cannot be empty' ) ; } return $ this -> performDeviceGroupOperation ( $ senderId , $ notificationKeyName , $ notificationKey , $ registrationIds , self :: DEVICE_GROUP_ADD ) ; }
Adds devices to an existing device group.

@param $senderId A unique numerical value created when you configure your API project
(given as "Project Number" in the Google Developers Console). The sender ID is used in the registration
process to identify an app server that is permitted to send messages to the client app.
@param $notificationKeyName a name or identifier (e.g., it can be a username) that is unique to a given group.
The notificationKeyName and notificationKey are unique to a group of registration tokens. It is important
that notificationKeyName is unique per client app if you have multiple client apps for the same sender ID.
This ensures that messages only go to the intended target app.
@param $notificationKey the notificationKey returned from Sender#createDeviceGroup.
@param string|array $registrationIds String registration id or an array of registration ids of the devices to add to the group.
@return string notificationKey used to send a notification to all the devices in the group.
@throws \InvalidArgumentException If senderId, notificationKeyName, notificationKey or registrationIds are empty.
@throws InvalidRequestException If GCM did not return a 200.
Adds devices to an existing device group .