Class EasyRdf_Http_Response

Description

Class that represents an HTTP 1.0 / 1.1 response message.

Located in /EasyRdf/Http/Response.php (line 55)


	
			
Method Summary
static string decodeChunkedBody (string $body)
static EasyRdf_Http_Response fromString (string $responseStr)
object EasyRdf_Http_Response __construct (int $status, array $headers, [string $body = null], [string $version = '1.1'], [string $message = null])
string getBody ()
string|array|null getHeader (string$header $header)
array getHeaders ()
string getMessage ()
int getStatus ()
string getVersion ()
boolean isError ()
boolean isRedirect ()
boolean isSuccessful ()
Methods
static method decodeChunkedBody (line 283)

Decode a "chunked" transfer-encoded body and return the decoded text

  • access: public
static string decodeChunkedBody (string $body)
  • string $body
static method fromString (line 228)

Create an EasyRdf_Http_Response object from a HTTP response string

  • access: public
static EasyRdf_Http_Response fromString (string $responseStr)
  • string $responseStr
Constructor __construct (line 97)

Constructor.

  • access: public
object EasyRdf_Http_Response __construct (int $status, array $headers, [string $body = null], [string $version = '1.1'], [string $message = null])
  • 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
getBody (line 169)

Get the response body as string

  • access: public
string getBody ()
getHeader (line 212)

Get a specific header as string, or null if it is not set

  • access: public
string|array|null getHeader (string$header $header)
  • string$header $header
getHeaders (line 201)

Get the response headers

  • access: public
array getHeaders ()
getMessage (line 159)

Return a message describing the HTTP response code (Eg. "OK", "Not Found", "Moved Permanently")

  • access: public
string getMessage ()
getStatus (line 148)

Get the HTTP response status code

  • access: public
int getStatus ()
getVersion (line 191)

Get the HTTP version of the response

  • access: public
string getVersion ()
isError (line 128)

Check whether the response is an error

  • access: public
boolean isError ()
isRedirect (line 138)

Check whether the response is a redirection

  • access: public
boolean isRedirect ()
isSuccessful (line 118)

Check whether the response in successful

  • access: public
boolean isSuccessful ()

Documentation generated on Wed, 20 Jul 2011 19:54:05 +0100 by phpDocumentor 1.4.3