1 | <?php |
||
18 | class NotificationServices |
||
19 | { |
||
20 | const APPLE_PUSH_NOTIFICATIONS_SERVICE = 'APNS'; |
||
21 | const GOOGLE_CLOUD_MESSAGING = 'GCM'; |
||
22 | const MICROSOFT_PUSH_NOTIFICATIONS_SERVICE = 'MPNS'; |
||
23 | |||
24 | const CREDENTIALS_NULL = 1; |
||
25 | const CREDENTIALS_CERTIFICATE = 2; |
||
26 | const CREDENTIALS_AUTH_TOKEN = 3; |
||
27 | |||
28 | /** |
||
29 | * List of supported notification services |
||
30 | * |
||
31 | * @return array |
||
32 | */ |
||
33 | public static function getAvailableServices() |
||
42 | |||
43 | /** |
||
44 | * Checks if notification service is supported |
||
45 | * |
||
46 | * @param string $serviceName |
||
47 | * @return string |
||
48 | * @throws DomainException |
||
49 | */ |
||
50 | public static function validateServiceName($serviceName) |
||
57 | |||
58 | /** |
||
59 | * @param string $serviceName |
||
60 | * @return int |
||
61 | */ |
||
62 | public static function getCredentialsTypeByService($serviceName) |
||
74 | } |
||
75 |