HEX
Server: nginx/1.27.0
System: Linux 20d173156d2c 6.8.0-88-generic #89-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 01:02:46 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wp-all-export/src/Http/Response.php
<?php

namespace Wpae\Http;


class Response
{
    protected $content;

    protected $status;

    protected $headers = array(
        'Content-Type' => 'text/html'
    );

    public function __construct($content, $status = 200)
    {
        $this->content = $content;
        $this->status = $status;
    }

    public function render()
    {
        $this->sendHeaders();
        $this->sendContent();
        die;
    }

    protected function sendHeaders()
    {
        foreach($this->headers as $header => $value) {
            header($header.': '.$value);
        }
        http_response_code($this->status);
    }

    protected function sendContent()
    {
        echo $this->content;
    }
}