MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1536/exactflashing.com/wp-content/plugins/wp-all-export/src/Http/
File Upload :
Current < : /hermes/bosweb/b1536/exactflashing.com/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;
    }
}