HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/bellecouture/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;
    }
}