
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. | |
| getLocale () | |
| Provides the spunQ_Locale the request was made in. | |
| getRawPostData () | |
| Returns the raw post data string to be re-used. | |
Static Public Member Functions | |
| static | getInstance () |
| Gets the singleton instance of this class. | |
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. | |
Protected Attributes | |
| $clientInformation = NULL | |
| Information about the client making the request. | |
| $locale = NULL | |
Private Member Functions | |
| __construct () | |
| Constructor. | |
Private Attributes | |
| $httpHeaders = NULL | |
| All HTTP headers that were sent along with this request. | |
| $requestDateTime = NULL | |
| DateTime the request was received. | |
| $uploadedFiles = NULL | |
| Files that have been uploaded. | |
Static Private Attributes | |
| static | $instance = NULL |
| The singleton instance of this class. | |
Definition at line 6 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::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.
Implements spunQ_IHttpRequest.
Definition at line 168 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getCookies | ( | ) |
Provides all cookies sent with the request.
Implements spunQ_IHttpRequest.
Definition at line 203 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getCookieValue | ( | $ | cookie | ) |
Provides a single cookie sent with the request.
| $cookie | Name of the cookie to be retrieved. |
NULL if no such cookie was received. Implements spunQ_IHttpRequest.
Definition at line 210 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getGetValue | ( | $ | name | ) |
Provides a single GET parameter value sent with the request.
| $name | Name of the parameter to be retrieved. |
NULL if no such parameter was received. Implements spunQ_IHttpRequest.
Definition at line 227 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getGetValues | ( | ) |
Provides the GET parameters of this request.
These are the parameters passed as the query string of the URL.
Implements spunQ_IHttpRequest.
Definition at line 220 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getHost | ( | ) |
Provides the host this request was directed at.
NULL if the IP address was used (and accepted by the web server). Implements spunQ_IHttpRequest.
Definition at line 141 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getHttpHeaders | ( | ) |
Provides all HTTP headers of the request.
Implements spunQ_IHttpRequest.
Definition at line 97 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getHttpHeaderValue | ( | $ | header | ) |
Provides a single HTTP header value.
NULL if no such header was received. Implements spunQ_IHttpRequest.
Definition at line 112 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getHttpVersion | ( | ) |
Provides the http version used for the request.
Implements spunQ_IHttpRequest.
Definition at line 64 of file CurrentHttpRequest.class.php.
| static spunQ_CurrentHttpRequest::getInstance | ( | ) | [static] |
Gets the singleton instance of this class.
Definition at line 18 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getLocale | ( | ) |
Provides the spunQ_Locale the request was made in.
Will fall back to the default locale if no explicit locale was passed with the url.
Definition at line 288 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getPostValue | ( | $ | name | ) |
Provides a single PAST parameter value sent with the request.
| $name | Name of the parameter to be retrieved. |
NULL if no such parameter was received. Implements spunQ_IHttpRequest.
Definition at line 244 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getPostValues | ( | ) |
Provides the POST parameters of this request.
These are the parameters passed as the query string of the URL.
Implements spunQ_IHttpRequest.
Definition at line 237 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getRawPostData | ( | ) |
Returns the raw post data string to be re-used.
Definition at line 312 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getRequestDateTime | ( | ) |
Provides the datetime the request was received.
Implements spunQ_IHttpRequest.
Definition at line 182 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getRequestMethod | ( | ) |
Provides the request method.
Implements spunQ_IHttpRequest.
Definition at line 76 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getUploadedFile | ( | $ | name | ) |
Provides a single file that has been uploaded.
| $name | Name of the file upload field to retrieve |
Implements spunQ_IHttpRequest.
Definition at line 271 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getUploadedFiles | ( | ) |
Provides the all files that have been uploaded.
Implements spunQ_IHttpRequest.
Definition at line 254 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::getUrl | ( | $ | includeQueryString = true |
) |
Provides the requested URL.
| $includeQueryString | The function will remove the query string if this is passed as false. |
Implements spunQ_IHttpRequest.
Definition at line 151 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::isAjax | ( | ) |
Determines if a request was sent via ajax.
Implements spunQ_IHttpRequest.
Definition at line 134 of file CurrentHttpRequest.class.php.
| spunQ_CurrentHttpRequest::usesSsl | ( | ) |
Whether the request was sent through a secure connection.
Implements spunQ_IHttpRequest.
Definition at line 124 of file CurrentHttpRequest.class.php.
spunQ_CurrentHttpRequest::$clientInformation = NULL [protected] |
Information about the client making the request.
Definition at line 52 of file CurrentHttpRequest.class.php.
spunQ_CurrentHttpRequest::$httpHeaders = NULL [private] |
All HTTP headers that were sent along with this request.
Initialized on demand in getHttpHeaders()/getHttpHeaderValue().
Definition at line 31 of file CurrentHttpRequest.class.php.
spunQ_CurrentHttpRequest::$instance = NULL [static, private] |
spunQ_CurrentHttpRequest::$requestDateTime = NULL [private] |
DateTime the request was received.
Initialized on demand in getRequestDateTime().
Definition at line 38 of file CurrentHttpRequest.class.php.
spunQ_CurrentHttpRequest::$uploadedFiles = NULL [private] |
Files that have been uploaded.
Initialized on demand in getUploadedFiles()/getUploadedFile().
Definition at line 46 of file CurrentHttpRequest.class.php.
1.5.9