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: Notification.php
Close
<?php declare(strict_types=1); namespace Kreait\Firebase\Messaging; use Kreait\Firebase\Exception\InvalidArgumentException; final class Notification implements \JsonSerializable { private ?string $title; private ?string $body; private ?string $imageUrl; /** * @throws InvalidArgumentException if both title and body are null */ private function __construct(?string $title = null, ?string $body = null, ?string $imageUrl = null) { $this->title = $title; $this->body = $body; $this->imageUrl = $imageUrl; if ($this->title === null && $this->body === null) { throw new InvalidArgumentException('The title and body of a notification cannot both be NULL'); } } /** * @throws InvalidArgumentException if both title and body are null */ public static function create(?string $title = null, ?string $body = null, ?string $imageUrl = null): self { return new self($title, $body, $imageUrl); } /** * @param array{ * title?: string, * body?: string, * image?: string * } $data * * @throws InvalidArgumentException if both title and body are null */ public static function fromArray(array $data): self { return new self( $data['title'] ?? null, $data['body'] ?? null, $data['image'] ?? null ); } public function withTitle(string $title): self { $notification = clone $this; $notification->title = $title; return $notification; } public function withBody(string $body): self { $notification = clone $this; $notification->body = $body; return $notification; } public function withImageUrl(string $imageUrl): self { $notification = clone $this; $notification->imageUrl = $imageUrl; return $notification; } public function title(): ?string { return $this->title; } public function body(): ?string { return $this->body; } public function imageUrl(): ?string { return $this->imageUrl; } /** * @return array<string, string> */ public function jsonSerialize(): array { return \array_filter([ 'title' => $this->title, 'body' => $this->body, 'image' => $this->imageUrl, ], static fn ($value) => $value !== null); } }