My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HttpResponse  
Represents an HTTP protocol response.
Autogenerated
Updated Jan 13, 2010 by innovat...@gmail.com

note: this page is automatically generated from embedded documentation in the PHP source.

Overview

Constructors

Methods

  • is_cacheable - Tests whether this response is suitable for caching
  • is_success - Tests whether the response indicates the request was successful
  • to_html - Obtain an html representation of this response
  • to_string - Obtain a string representation of this response

Fields

  • $body - Obtain a string representation of this response
  • $headers - Obtain a string representation of this response
  • $info - Obtain a string representation of this response
  • $request - Obtain a string representation of this response
  • $status_code - Obtain a string representation of this response

Constructor Detail

HttpResponse

public HttpResponse(mixed status_code)

Create a new instance of this class

Param:
int status_code the status code of the response

Method Detail

is_cacheable

public void is_cacheable()

Tests whether this response is suitable for caching

Return:
boolean true if the response can be cached, false otherwise

is_success

public void is_success()

Tests whether the response indicates the request was successful

Return:
boolean true if the status code is between 200 and 299 inclusive, false otherwise

to_html

public void to_html()

Obtain an html representation of this response

Return:
string

to_string

public void to_string()

Obtain a string representation of this response

Return:
string

Field Detail

body

public string $body

The entity body returned with the response

headers

public array $headers = array()

The HTTP headers returned with this response. This is an associative array whose keys are the header name and values are the header values.

info

public array $info = array()

Additional information about this response

request

public HttpRequest $request

The request that was responsible for generating this response

status_code

public int $status_code

The HTTP status code of the response

Generated by PHPDoctor 2RC2


Sign in to add a comment
Powered by Google Project Hosting