OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
kreait
/
firebase-php
/
src
/
Firebase
/
Messaging
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:35:39 AM
rwxr-xr-x
📄
AndroidConfig.php
3.1 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
ApiClient.php
1.57 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
ApnsConfig.php
3.43 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
AppInstance.php
2.36 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
AppInstanceApiClient.php
5.45 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
CloudMessage.php
9.41 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
Condition.php
1.09 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
FcmOptions.php
1.15 KB
08/12/2024 10:35:38 AM
rw-r--r--
📁
Http
-
08/12/2024 10:36:41 AM
rwxr-xr-x
📄
Message.php
128 bytes
08/12/2024 10:35:38 AM
rw-r--r--
📄
MessageData.php
2.75 KB
08/12/2024 10:35:38 AM
rw-r--r--
📄
MessageTarget.php
1.78 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
Messages.php
717 bytes
08/12/2024 10:35:38 AM
rw-r--r--
📄
MulticastSendReport.php
5.25 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
Notification.php
2.55 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
RawMessageFromArray.php
471 bytes
08/12/2024 10:35:39 AM
rw-r--r--
📄
RegistrationToken.php
639 bytes
08/12/2024 10:35:39 AM
rw-r--r--
📄
RegistrationTokens.php
2.58 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
SendReport.php
2.2 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
Topic.php
929 bytes
08/12/2024 10:35:39 AM
rw-r--r--
📄
TopicSubscription.php
1.2 KB
08/12/2024 10:35:39 AM
rw-r--r--
📄
TopicSubscriptions.php
950 bytes
08/12/2024 10:35:39 AM
rw-r--r--
📄
WebPushConfig.php
2.63 KB
08/12/2024 10:35:39 AM
rw-r--r--
Editing: MessageTarget.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Messaging; use Kreait\Firebase\Exception\InvalidArgumentException; final class MessageTarget { public const CONDITION = 'condition'; public const TOKEN = 'token'; public const TOPIC = 'topic'; /** @internal */ public const UNKNOWN = 'unknown'; public const TYPES = [ self::CONDITION, self::TOKEN, self::TOPIC, self::UNKNOWN, ]; private string $type; private string $value; private function __construct(string $type, string $value) { $this->type = $type; $this->value = $value; } /** * Create a new message target with the given type and value. * * @throws InvalidArgumentException */ public static function with(string $type, string $value): self { $targetType = \mb_strtolower($type); switch ($targetType) { case self::CONDITION: $targetValue = (string) Condition::fromValue($value); break; case self::TOKEN: $targetValue = (string) RegistrationToken::fromValue($value); break; case self::TOPIC: $targetValue = (string) Topic::fromValue($value); break; case self::UNKNOWN: $targetValue = $value; break; default: throw new InvalidArgumentException("Invalid target type '{$type}', valid types: ".\implode(', ', self::TYPES)); } return new self($targetType, $targetValue); } public function type(): string { return $this->type; } public function value(): string { return $this->value; } }