dmBridge PHP API
DMHTTPResponse Class Reference

Encapsulates an HTTP response. More...

Inheritance diagram for DMHTTPResponse:

Public Member Functions


Detailed Description

Encapsulates an HTTP response.

Author:
Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php

Definition at line 15 of file DMHTTPResponse.php.


Member Function Documentation

DMHTTPResponse::__toString ( )
Returns:
string String representation of the body of the response representation.

Definition at line 83 of file DMHTTPResponse.php.

DMHTTPResponse::addCookie ( key,
value 
)
Parameters:
stringkey
stringvalue

Definition at line 91 of file DMHTTPResponse.php.

DMHTTPResponse::getCookie ( key)
Parameters:
stringkey
Returns:
string

Definition at line 99 of file DMHTTPResponse.php.

DMHTTPResponse::getCookies ( )
Returns:
array Array of key-value pairs

Definition at line 107 of file DMHTTPResponse.php.

DMHTTPResponse::getStatusCode ( )
Returns:
int

Definition at line 150 of file DMHTTPResponse.php.

Referenced by send().

DMHTTPResponse::getStatusMessage ( )
Returns:
string

Definition at line 164 of file DMHTTPResponse.php.

Referenced by send().

DMHTTPResponse::send ( )

Sends the response.

If the body is a DMFile, it will be streamed using readfile(). If it is a DMShellCommand, it will be executed with popen() and the output streamed via echo. If any other type, it will be echoed.

Returns:
void

Definition at line 118 of file DMHTTPResponse.php.

DMHTTPResponse::setStatusCode ( code)
Parameters:
intcode

Definition at line 157 of file DMHTTPResponse.php.

DMHTTPResponse::setStatusMessage ( message)
Parameters:
stringmessage

Definition at line 171 of file DMHTTPResponse.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables