You are here

public function EasyRdf_Http_Response::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php \EasyRdf_Http_Response::__construct()

Constructor.

Parameters

int $status HTTP Status code:

array $headers The HTTP response headers:

string $body The content of the response:

string $version The HTTP Version (1.0 or 1.1):

string $message The HTTP response Message:

Return value

object EasyRdf_Http_Response

File

vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php, line 91

Class

EasyRdf_Http_Response
Class that represents an HTTP 1.0 / 1.1 response message.

Code

public function __construct($status, $headers, $body = null, $version = '1.1', $message = null) {
  $this->status = intval($status);
  $this->body = $body;
  $this->version = $version;
  $this->message = $message;
  foreach ($headers as $k => $v) {
    $k = ucwords(strtolower($k));
    $this->headers[$k] = $v;
  }
}