Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/demo.cartinsight.co/vendor/spatie/ray/src/Payloads/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/demo.cartinsight.co/vendor/spatie/ray/src/Payloads/ExceptionPayload.php
<?php

namespace Spatie\Ray\Payloads;

use Spatie\Backtrace\Backtrace;
use Spatie\Backtrace\Frame;
use Throwable;

class ExceptionPayload extends Payload
{
    /** @var \Throwable */
    protected $exception;

    /** @var array */
    protected $meta = [];

    public function __construct(Throwable $exception, array $meta = [])
    {
        $this->exception = $exception;

        $this->meta = $meta;
    }

    public function getType(): string
    {
        return 'exception';
    }

    public function getContent(): array
    {
        Backtrace::createForThrowable($this->exception);

        return [
            'class' => get_class($this->exception),
            'message' => $this->exception->getMessage(),
            'frames' => $this->getFrames(),
            'meta' => $this->meta,
        ];
    }

    protected function getFrames(): array
    {
        $frames = Backtrace::createForThrowable($this->exception)->frames();

        return array_map(function (Frame $frame) {
            return [
                'file_name' => $this->replaceRemotePathWithLocalPath($frame->file),
                'line_number' => $frame->lineNumber,
                'class' => $frame->class,
                'method' => $frame->method,
                'vendor_frame' => ! $frame->applicationFrame,
                'snippet' => $frame->getSnippetProperties(12),
            ];
        }, $frames);
    }
}

Spamworldpro Mini