16 static::TYPE_APPLE => [
17 'ID' => static::TYPE_APPLE,
18 'CLASS' => Service\Apple::class,
19 'NAME' =>
'Apple Push Notifications'
21 static::TYPE_APPLE_VOIP => [
22 'ID' => static::TYPE_APPLE_VOIP,
23 'CLASS' => Service\AppleVoip::class,
24 'NAME' =>
'Apple Push Notifications (Voip Service)'
26 static::TYPE_GOOGLE_REV2 => [
27 'ID' => static::TYPE_GOOGLE_REV2,
28 'CLASS' => Service\GoogleInteractive::class,
29 'NAME' =>
'Google Cloud Messages rev.2'
31 static::TYPE_GOOGLE => [
32 'ID' => static::TYPE_GOOGLE,
33 'CLASS' => Service\Google::class,
34 'NAME' =>
'Google Cloud Messages'
36 static::TYPE_HUAWEI => [
37 'ID' => static::TYPE_HUAWEI,
38 'CLASS' => Service\HuaweiPushKit::class,
39 'NAME' =>
'Huawei Cloud Messages'
43 foreach (GetModuleEvents(
"pull",
"OnPushServicesBuildList",
true) as $arEvent)
45 $res = ExecuteModuleEventEx($arEvent);
48 if (!is_array($res[0]))
52 foreach ($res as $serv)
54 if (!class_exists($serv[
'CLASS']))
56 trigger_error(
'Class ' . $serv[
'CLASS'] .
' does not exists', E_USER_WARNING);
59 if (!($serv[
'CLASS'] instanceof PushService))
61 trigger_error(
'Class ' . $serv[
'CLASS'] .
' must implement ' . PushService::class .
' interface', E_USER_WARNING);
65 $result[$serv[
"ID"]] = $serv;