Class MOXMAN_Http_Request
Inheritance | MOXMAN_Http_Request |
---|
This class wrapps in the HTTP Request and adds various useful options.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$getParams | array | MOXMAN_Http_Request | |
$headers | array | MOXMAN_Http_Request | |
$postParams | array | MOXMAN_Http_Request | |
$url | array | MOXMAN_Http_Request |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Constructs a new HTTP Request instance. | MOXMAN_Http_Request |
get() | Returns the specified item stripped from slashes. | MOXMAN_Http_Request |
getAll() | Returns a name/value array with all items merged. | MOXMAN_Http_Request |
getFile() | Returns a single file object by name or null. | MOXMAN_Http_Request |
getFiles() | Returns an array of file items that got uploaded. | MOXMAN_Http_Request |
getHeader() | Returns a specific header by name. | MOXMAN_Http_Request |
getMethod() | Returns the current HTTP method as an uppercase string. | MOXMAN_Http_Request |
getUrl() | Returns the currently requested page as an URL name/value array. | MOXMAN_Http_Request |
has() | Returns true/false if the request has the specified item name or not. | MOXMAN_Http_Request |
Property Details
Method Details
Constructs a new HTTP Request instance.
public void __construct ( ) |
Returns the specified item stripped from slashes.
public String get ( $name, $default = "" ) | ||
$name | string | Name of the item to retrive. |
$default | string | Default value to return if the specified item wasn't found. |
return | String | Value of the specified string or an empty string if it wasn't found. |
---|
Returns a name/value array with all items merged.
public Array getAll ( ) | ||
return | Array | Name/value array with get and post merged. |
---|
Returns a single file object by name or null.
public array getFile ( $name ) | ||
$name | string | Name of multipart file upload form field. |
return | array | File array object or null. |
---|
Returns an array of file items that got uploaded.
public Array getFiles ( ) | ||
return | Array | Array with the files that got uploaded. |
---|
Returns a specific header by name.
public String getHeader ( $name, $defaultValue = null ) | ||
$name | String | Name of header to get. |
$defaultValue | String | Optional default value if the header isn't defined. |
return | String | Current header value or default value if it wasn't found. |
---|
Returns the current HTTP method as an uppercase string.
public String getMethod ( ) | ||
return | String | Upper case HTTP Method like GET, POST etc. |
---|
Returns the currently requested page as an URL name/value array.
public Array getUrl ( ) | ||
return | Array | Name/value array with URL details. |
---|
Returns true/false if the request has the specified item name or not.
public Boolean has ( $name ) | ||
$name | string | Name if the item to check for. |
return | Boolean | True/false if the item exists or not. |
---|