public function sendMulti($type, $tokens, $text, $payloadData = [], $args = [])
{
$client = null;
$result = null;
$this->errors = [];
if ($type == self::TYPE_GCM) {
$client = $this->getGcmClient();
$result = $client->sendMulti($tokens, $text, $payloadData, $args);
$this->success = $client->success;
} elseif ($type == self::TYPE_APNS) {
$client = $this->getApnsClient();
$result = $client->sendMulti($tokens, $text, $payloadData, $args);
$this->success = $client->success;
}
if (!$this->success) {
$this->errors = $client->errors;
}
return $result;
}