PHP 8.2.30
Preview: ResponseWithCachedBody.php Size: 734 B
/proc/thread-self/root/home/byroehnu/easetack.com/vendor/spatie/crawler/src/ResponseWithCachedBody.php

<?php

namespace Spatie\Crawler;

use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseInterface;

class ResponseWithCachedBody extends Response
{
    protected ?string $cachedBody = null;

    public static function fromGuzzlePsr7Response(ResponseInterface $response): static
    {
        return new static(
            $response->getStatusCode(),
            $response->getHeaders(),
            $response->getBody(),
            $response->getProtocolVersion(),
            $response->getReasonPhrase()
        );
    }

    public function setCachedBody(?string $body = null): void
    {
        $this->cachedBody = $body;
    }

    public function getCachedBody(): ?string
    {
        return $this->cachedBody;
    }
}

Directory Contents

Dirs: 6 × Files: 5

Name Size Perms Modified Actions
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
Handlers DIR
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
- drwxrwxrwx 2025-05-16 16:14:51
Edit Download
15.61 KB lrw-rw-rw- 2025-02-24 09:20:47
Edit Download
1.14 KB lrw-rw-rw- 2025-02-24 09:20:47
Edit Download
938 B lrw-rw-rw- 2025-02-24 09:20:47
Edit Download
734 B lrw-rw-rw- 2025-02-24 09:20:47
Edit Download
323 B lrw-rw-rw- 2025-02-24 09:20:47
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).