Public Member Functions | |
| getStatus ($name=false) | |
| setStatus ($status) | |
| getCompress () | |
| setCompress ($compress) | |
| getLayout () | |
| setlayout ($layout) | |
| getAjaxLayout () | |
| setAjaxlayout ($ajaxLayout) | |
| addHeader ($name, $value, $replace=true) | |
| setContentType ($value, $replace=true) | |
| neverExpire () | |
| getHeader ($name=null) | |
| hasHeader ($name) | |
| clearHeaders () | |
| sendHeaders () | |
| addBeforeOut ($callback) | |
| send ($headerOnly=false) | |
| sendText ($text) | |
| sendFile ($file, $name=null, $delete=false) | |
| sendFileAsString ($file, $name) | |
| showFile ($file) | |
| comment ($comment) | |
| redirect ($url, $status=301) | |
| error ($url=null, $number=404) | |
| getProxy () | |
| getContent () | |
| setContent ($content) | |
| send () | |
| __call ($func, $prm) | |
| __toString () | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| afterInit () | |
| beforeOut () | |
| mediaDownload ($file, $forceDownload=false, $fileName=null, $delete=false) | |
| beforeInit () | |
Protected Attributes | |
| $headers | |
| $beforeOut = array() | |
| $content | |
| $proxy = null | |
| $cfg | |
HTTP response
Definition at line 10 of file http.class.php.
| __call | ( | $ | func, | |
| $ | prm | |||
| ) | [inherited] |
Here to avoid wrong call to the response object
Definition at line 78 of file response/abstract.class.php.
| __toString | ( | ) | [inherited] |
Definition at line 80 of file response/abstract.class.php.
| addBeforeOut | ( | $ | callback | ) |
Add a callback before the out
| callback | $callback |
Definition at line 204 of file http.class.php.
| addHeader | ( | $ | name, | |
| $ | value, | |||
| $ | replace = true | |||
| ) |
Add a http header to the response
| string | $name Header name | |
| mixed | $value Header value | |
| bool | $replace True if replacement forced |
Definition at line 119 of file http.class.php.
| afterInit | ( | ) | [protected] |
Call just after the configuration initialisation
Reimplemented from object.
Reimplemented in response_http_html, and response_http_xul.
Definition at line 26 of file http.class.php.
| beforeInit | ( | ) | [protected, inherited] |
Call just before the configuration initialisation
Reimplemented in form_file.
Definition at line 35 of file object.class.php.
| beforeOut | ( | ) | [protected] |
Execute the before out callbacks
Definition at line 211 of file http.class.php.
| clearHeaders | ( | ) |
Clear the header by reaffecting the default values, provided in the config
Definition at line 183 of file http.class.php.
| comment | ( | $ | comment | ) |
Return the content commented regarding the request type
| string | $comment |
Reimplemented from response_abstract.
Definition at line 441 of file http.class.php.
| error | ( | $ | url = null, |
|
| $ | number = 404 | |||
| ) |
Redirect with an error the user
| string | $url The url where to redirect | |
| int | $number The HTTP error number |
Definition at line 478 of file http.class.php.
| getAjaxLayout | ( | ) |
| getAttr | ( | $ | name | ) | [inherited] |
Get an attribute
| string | $name Attribute name |
Reimplemented in response_proxy.
Definition at line 48 of file object.class.php.
| getCfg | ( | ) | [inherited] |
| getCompress | ( | ) |
| getContent | ( | ) | [inherited] |
| getHeader | ( | $ | name = null |
) |
Get a header value
| string|null | $name Header name or null to get all of them |
Definition at line 162 of file http.class.php.
| getLayout | ( | ) |
| getProxy | ( | ) | [inherited] |
Get the response proxy (used in the templates)
Definition at line 31 of file response/abstract.class.php.
| getStatus | ( | $ | name = false |
) |
Get the response status
| bool | $name True if the return should be the name instead of the code status |
Definition at line 36 of file http.class.php.
| hasHeader | ( | $ | name | ) |
Check if a header is set
| string | $name Header name |
Definition at line 176 of file http.class.php.
| mediaDownload | ( | $ | file, | |
| $ | forceDownload = false, |
|||
| $ | fileName = null, |
|||
| $ | delete = false | |||
| ) | [protected] |
Send a media to download, using HTTP range or not, is possible
| string | $file File Path | |
| bool | $forceDownload True if the media should be forced to download | |
| string | $fileName Filename to send to the browser. If null, basename will be used | |
| bool | $delete Indicate if the file should be deleted after download |
Definition at line 324 of file http.class.php.
| neverExpire | ( | ) |
Make the response to expire in 32 days
Definition at line 152 of file http.class.php.
| redirect | ( | $ | url, | |
| $ | status = 301 | |||
| ) |
Redirect the user with a header content
| string | $url | |
| int | $status |
Definition at line 463 of file http.class.php.
| send | ( | ) | [abstract, inherited] |
Send The response
| send | ( | $ | headerOnly = false |
) |
Send The response
| bool | $headerOnly Send only the header and exit |
Reimplemented in response_http_html.
Definition at line 224 of file http.class.php.
| sendFile | ( | $ | file, | |
| $ | name = null, |
|||
| $ | delete = false | |||
| ) |
Send a file for download
| string | $file File Path | |
| null|string | $name File name. If not provided, the real filname will be used | |
| bool | $delete Indicate if the file should be deleted after download |
Definition at line 267 of file http.class.php.
| sendFileAsString | ( | $ | file, | |
| $ | name | |||
| ) |
Send a file for download using a string
| string | $file File contents | |
| string | $name File name. |
Definition at line 281 of file http.class.php.
| sendHeaders | ( | ) |
Send HTTP headers and cookies.
Definition at line 190 of file http.class.php.
| sendText | ( | $ | text | ) |
Send a text response (exit the programm)
| string | $text |
Reimplemented from response_abstract.
Definition at line 253 of file http.class.php.
| setAjaxlayout | ( | $ | ajaxLayout | ) |
Set a new ajax layout to use
| string | $ajaxLayout |
Definition at line 107 of file http.class.php.
| setAttr | ( | $ | name, | |
| $ | value | |||
| ) | [inherited] |
Set an attribute
| string | $name Attribute name | |
| mixed | $value Attribute value |
Reimplemented in response_proxy.
Definition at line 58 of file object.class.php.
| setCompress | ( | $ | compress | ) |
Activate or desactivate the compress mode
| bool | $compress |
Definition at line 71 of file http.class.php.
| setContent | ( | $ | content | ) | [inherited] |
set the response content
| mixed | $content |
Definition at line 49 of file response/abstract.class.php.
| setContentType | ( | $ | value, | |
| $ | replace = true | |||
| ) |
Set the content type Header of the response
| string | $value The content type wanted (ie: html, js) (if not know in contentTypeCfg, it will be text/$value) | |
| bool | $replace Indicate if the content-type could overwrite the current one |
Definition at line 137 of file http.class.php.
| setlayout | ( | $ | layout | ) |
| setStatus | ( | $ | status | ) |
Set the reponse status by code
| int | $status |
Definition at line 49 of file http.class.php.
| showFile | ( | $ | file | ) |
Show a file to the client
| string | $file File Path |
Definition at line 298 of file http.class.php.
$beforeOut = array() [protected] |
Definition at line 24 of file http.class.php.
$cfg [protected, inherited] |
Definition at line 17 of file object.class.php.
$content [protected, inherited] |
Definition at line 17 of file response/abstract.class.php.
$headers [protected] |
Definition at line 17 of file http.class.php.
$proxy = null [protected, inherited] |
Definition at line 24 of file response/abstract.class.php.
1.7.1