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: RegistrationTokens.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Messaging; use Countable; use IteratorAggregate; use Kreait\Firebase\Exception\InvalidArgumentException; use Traversable; /** * @implements IteratorAggregate<RegistrationToken> */ final class RegistrationTokens implements Countable, IteratorAggregate { /** @var RegistrationToken[] */ private array $tokens; public function __construct(RegistrationToken ...$tokens) { $this->tokens = $tokens; } /** * @param RegistrationTokens|RegistrationToken|RegistrationToken[]|string[]|string $values * * @throws InvalidArgumentException */ public static function fromValue($values): self { if ($values instanceof self) { $tokens = $values->values(); } elseif ($values instanceof RegistrationToken) { $tokens = [$values]; } elseif (\is_string($values)) { $tokens = [RegistrationToken::fromValue($values)]; } elseif (\is_array($values)) { $tokens = []; foreach ($values as $value) { if ($value instanceof RegistrationToken) { $tokens[] = $value; } elseif (\is_string($value)) { $tokens[] = RegistrationToken::fromValue($value); } } } else { throw new InvalidArgumentException('Unsupported value(s)'); } return new self(...$tokens); } /** * @codeCoverageIgnore * * @return Traversable<RegistrationToken>|RegistrationToken[] */ public function getIterator(): Traversable { yield from $this->tokens; } public function isEmpty(): bool { return $this->tokens === []; } /** * @return array<RegistrationToken> */ public function values(): array { return $this->tokens; } /** * @return string[] */ public function asStrings(): array { return \array_map('strval', $this->tokens); } public function count(): int { return \count($this->tokens); } /** * @param RegistrationToken|string $token */ public function has($token): bool { $token = $token instanceof RegistrationToken ? $token : RegistrationToken::fromValue($token); foreach ($this->tokens as $existing) { if ($existing->value() === $token->value()) { return true; } } return false; } }