spunQ_IHttpRequest Interface Reference

An HTTP request. More...

Inheritance diagram for spunQ_IHttpRequest:

spunQ_CurrentHttpRequest

List of all members.

Public Member Functions

 getHttpVersion ()
 Provides the http version used for the request.
 getRequestMethod ()
 Provides the request method.
 getHttpHeaders ()
 Provides all HTTP headers of the request.
 getHttpHeaderValue ($header)
 Provides a single HTTP header value.
 usesSsl ()
 Whether the request was sent through a secure connection.
 isAjax ()
 Determines if a request was sent via ajax.
 getHost ()
 Provides the host this request was directed at.
 getUrl ($includeQueryString=true)
 Provides the requested URL.
 getClientInformation ()
 Provides the client information extracted from HTTP headers.
 getRequestDateTime ()
 Provides the datetime the request was received.
 getCookies ()
 Provides all cookies sent with the request.
 getCookieValue ($cookie)
 Provides a single cookie sent with the request.
 getGetValues ()
 Provides the GET parameters of this request.
 getGetValue ($name)
 Provides a single GET parameter value sent with the request.
 getPostValues ()
 Provides the POST parameters of this request.
 getPostValue ($name)
 Provides a single PAST parameter value sent with the request.
 getUploadedFiles ()
 Provides the all files that have been uploaded.
 getUploadedFile ($name)
 Provides a single file that has been uploaded.

Public Attributes

const REQUEST_UNKNOWN = 0
 Unknown request type.
const REQUEST_GET = 1
 Http Get request.
const REQUEST_POST = 2
 Http Post request.
const REQUEST_HEAD = 4
 Http Head request.
const REQUEST_PUT = 8
 Http Put request.
const HTTP_VERSION_UNKNOWN = 0
 Unknown http version.
const HTTP_VERSION_1_0 = 1
 Http version 1.0.
const HTTP_VERSION_1_1 = 2
 Http version 1.1.


Detailed Description

An HTTP request.

Definition at line 6 of file IHttpRequest.interface.php.


Member Function Documentation

spunQ_IHttpRequest::getClientInformation (  ) 

Provides the client information extracted from HTTP headers.

Please note that all client information is unsafe, HTTP headers can be set arbitrarily by the requestor.

Returns:
spunQ_IHttpClientInformation

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getCookies (  ) 

Provides all cookies sent with the request.

Returns:
array Associative array mapping cookie names to their value.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getCookieValue ( cookie  ) 

Provides a single cookie sent with the request.

Parameters:
$cookie Name of the cookie to be retrieved.
Returns:
string? NULL if no such cookie was received.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getGetValue ( name  ) 

Provides a single GET parameter value sent with the request.

Parameters:
$name Name of the parameter to be retrieved.
Returns:
string? NULL if no such parameter was received.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getGetValues (  ) 

Provides the GET parameters of this request.

These are the parameters passed as the query string of the URL.

Returns:
array Associative array mapping parameter names to their value.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getHost (  ) 

Provides the host this request was directed at.

Returns:
string? Might be NULL if the IP address was used (and accepted by the web server).

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getHttpHeaders (  ) 

Provides all HTTP headers of the request.

Returns:
array Associative array mapping headers to their values.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getHttpHeaderValue ( header  ) 

Provides a single HTTP header value.

Returns:
string? NULL if no such header was received.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getHttpVersion (  ) 

Provides the http version used for the request.

Returns:
integer Either of the HTTP_VERSION_* constants.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getPostValue ( name  ) 

Provides a single PAST parameter value sent with the request.

Parameters:
$name Name of the parameter to be retrieved.
Returns:
string? NULL if no such parameter was received.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getPostValues (  ) 

Provides the POST parameters of this request.

These are the parameters passed as the query string of the URL.

Returns:
array Associative array mapping parameter names to their value.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getRequestDateTime (  ) 

Provides the datetime the request was received.

Returns:
spunQ_DateTime

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getRequestMethod (  ) 

Provides the request method.

Returns:
integer Either of the REQUEST_* constants.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getUploadedFile ( name  ) 

Provides a single file that has been uploaded.

Parameters:
$name Name of the file upload field to retrieve
Returns:
spunQ_File The file has the name it had on the machine the user had submitted the form from.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getUploadedFiles (  ) 

Provides the all files that have been uploaded.

Returns:
array Associative array mapping names of the file upload field names to files in [temporary] folders. The files have the name they had on the machine the user had submitted the form from.

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::getUrl ( includeQueryString = true  ) 

Provides the requested URL.

Parameters:
$includeQueryString The function will remove the query string if this is passed as false.
Returns:
string

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::isAjax (  ) 

Determines if a request was sent via ajax.

Returns:
boolean

Implemented in spunQ_CurrentHttpRequest.

spunQ_IHttpRequest::usesSsl (  ) 

Whether the request was sent through a secure connection.

Returns:
boolean

Implemented in spunQ_CurrentHttpRequest.


The documentation for this interface was generated from the following file:

Generated on Fri Jul 1 11:12:41 2011 for spunQ3 by  doxygen 1.5.9