403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/pull/lib/push/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/pull/lib/push/servicelist.php
<?php

namespace Bitrix\Pull\Push;

class ServiceList
{
	const TYPE_APPLE = 'APPLE';
	const TYPE_APPLE_VOIP = 'APPLE/VOIP';
	const TYPE_GOOGLE = 'GOOGLE';
	const TYPE_GOOGLE_REV2 = 'GOOGLE/REV2';
	const TYPE_HUAWEI = 'HUAWEI';

	public static function getServiceList(): array
	{
		$result = [
			static::TYPE_APPLE => [
				'ID' => static::TYPE_APPLE,
				'CLASS' => Service\Apple::class,
				'NAME' => 'Apple Push Notifications'
			],
			static::TYPE_APPLE_VOIP => [
				'ID' => static::TYPE_APPLE_VOIP,
				'CLASS' => Service\AppleVoip::class,
				'NAME' => 'Apple Push Notifications (Voip Service)'
			],
			static::TYPE_GOOGLE_REV2 => [
				'ID' => static::TYPE_GOOGLE_REV2,
				'CLASS' => Service\FirebaseAndroid::class,
				'NAME' => 'Google Cloud Messages rev.2'
			],
			static::TYPE_GOOGLE => [
				'ID' => static::TYPE_GOOGLE,
				'CLASS' => Service\Google::class,
				'NAME' => 'Google Cloud Messages'
			],
			static::TYPE_HUAWEI => [
				'ID' => static::TYPE_HUAWEI,
				'CLASS' => Service\HuaweiPushKit::class,
				'NAME' => 'Huawei Cloud Messages'
			]
		];

		foreach (GetModuleEvents("pull", "OnPushServicesBuildList", true) as $arEvent)
		{
			$res = ExecuteModuleEventEx($arEvent);
			if (is_array($res))
			{
				if (!is_array($res[0]))
				{
					$res = [$res];
				}
				foreach ($res as $serv)
				{
					if (!class_exists($serv['CLASS']))
					{
						trigger_error('Class ' . $serv['CLASS'] . ' does not exists', E_USER_WARNING);
						continue;
					}
					if (!($serv['CLASS'] instanceof PushService))
					{
						trigger_error('Class ' . $serv['CLASS'] . ' must implement ' . PushService::class .' interface', E_USER_WARNING);
						continue;
					}

					$result[$serv["ID"]] = $serv;
				}
			}
		}


		return $result;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit