Public Member Functions | |
| initIncFiles ($addDefaults=true) | |
| getTitle () | |
| setTitle ($title) | |
| addTitleBefore ($title, $sep= ', ') | |
| addTitleAfter ($title, $sep= ', ') | |
| setTitleInDes ($titleInDes) | |
| getMeta ($name) | |
| setMeta ($name, $value) | |
| getMetaProperty ($name) | |
| setMetaProperty ($name, $value) | |
| getLink ($rel) | |
| setLink ($rel, array $attributes) | |
| setMetaBefore ($name, $value, $sep= ', ') | |
| setMetaAfter ($name, $value, $sep= ', ') | |
| add (array $prm) | |
| getIncFiles () | |
| getDepend ($file, $type= 'js', $after=false) | |
| addJs ($prm) | |
| addCss ($prm) | |
| block ($block, $type= 'js', $first=false) | |
| blockJs ($block, $first=false) | |
| blockjQuery ($block, $addjQuery=true) | |
| blockCss ($block, $first=false) | |
| getHtmlElt ($prm= 'all', $ln="\n") | |
| getIncludeTagFile ($type, $files, $dir= 'nyro', $media= 'screen') | |
| getUrlFile ($type, $files, $dir= 'nyro') | |
| getHtmlBlocks ($type, $ln="\n") | |
| send ($headerOnly=false) | |
| 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 () | |
| 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) | |
| __call ($func, $prm) | |
| __toString () | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| afterInit () | |
| initBlocks ($type) | |
| setHtmlEltIntern ($content) | |
| getHtmlMeta ($ln="\n") | |
| getHtmlIncFiles ($type, $ln="\n") | |
| beforeOut () | |
| mediaDownload ($file, $forceDownload=false, $fileName=null, $delete=false) | |
| beforeInit () | |
Protected Attributes | |
| $incFiles | |
| $blocks = array() | |
| $blocksJquery = array() | |
| $headers | |
| $beforeOut = array() | |
| $content | |
| $proxy = null | |
| $cfg | |
HTML Response Provide functions to manage the head parts
Definition at line 11 of file html.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.
| add | ( | array $ | prm | ) |
Add an include file
| array | $prm Same parameter as addCss or addJs, with adding:
|
| nExecption | if type or file not provided |
Definition at line 207 of file html.class.php.
| addBeforeOut | ( | $ | callback | ) | [inherited] |
Add a callback before the out
| callback | $callback |
Definition at line 204 of file http.class.php.
| addCss | ( | $ | prm | ) |
Add an CSS file
| array | $prm Filename or parameter for the css file. Available keys are:
|
Definition at line 340 of file html.class.php.
| addHeader | ( | $ | name, | |
| $ | value, | |||
| $ | replace = true | |||
| ) | [inherited] |
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.
| addJs | ( | $ | prm | ) |
Add an javascript file
| string|array | $prm Filename or parameter for the css file. Available keys are:
|
Definition at line 321 of file html.class.php.
| addTitleAfter | ( | $ | title, | |
| $ | sep = ', |
|||
| ' | ||||
| ) |
Add a string after the acual title, with a spearator if needed
| string | $title | |
| string | $sep |
Definition at line 89 of file html.class.php.
| addTitleBefore | ( | $ | title, | |
| $ | sep = ', |
|||
| ' | ||||
| ) |
Add a string before the acual title, with a spearator if needed
| string | $title | |
| string | $sep |
Definition at line 79 of file html.class.php.
| afterInit | ( | ) | [protected] |
Call just after the configuration initialisation
Reimplemented from response_http.
Reimplemented in response_http_xul.
Definition at line 34 of file html.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, inherited] |
Execute the before out callbacks
Definition at line 211 of file http.class.php.
| block | ( | $ | block, | |
| $ | type = 'js', |
|||
| $ | first = false | |||
| ) |
Add a block
| string | $block The block | |
| string | $type the block type (js or css) | |
| bool | $first True if needed to be placed on the first place |
Definition at line 355 of file html.class.php.
| blockCss | ( | $ | block, | |
| $ | first = false | |||
| ) |
Add a CSS block
| string | $block The CSS block | |
| bool | $first True if needed to be placed on the first place |
Definition at line 399 of file html.class.php.
| blockjQuery | ( | $ | block, | |
| $ | addjQuery = true | |||
| ) |
Add a jQuery block
| string | $block The javascript block | |
| bool | $addjQuery Indicate if jQuery should be automatically added |
Definition at line 385 of file html.class.php.
| blockJs | ( | $ | block, | |
| $ | first = false | |||
| ) |
Add a javascript block
| string | $block The javascript block | |
| bool | $first True if needed to be placed on the first place |
Definition at line 374 of file html.class.php.
| clearHeaders | ( | ) | [inherited] |
Clear the header by reaffecting the default values, provided in the config
Definition at line 183 of file http.class.php.
| comment | ( | $ | comment | ) | [inherited] |
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 | |||
| ) | [inherited] |
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 | ( | ) | [inherited] |
| 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 | ( | ) | [inherited] |
| getContent | ( | ) | [inherited] |
| getDepend | ( | $ | file, | |
| $ | type = 'js', |
|||
| $ | after = false | |||
| ) |
Get the dependancies for a file
| string | $file File name | |
| string | $type File type (js or css) |
Definition at line 297 of file html.class.php.
| getHeader | ( | $ | name = null |
) | [inherited] |
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.
| getHtmlBlocks | ( | $ | type, | |
| $ | ln = "\n" | |||
| ) |
Get the HTML blocks
| string | $type Docuement type (css or js) | |
| string | $ln New line character |
Definition at line 563 of file html.class.php.
| getHtmlElt | ( | $ | prm = 'all', |
|
| $ | ln = "\n" | |||
| ) |
Get the HTML Head part requested or all (title, meta and included files). This function will only return a placeholder that will be overwritten at the very end, just before the content is send.
| string | $prm The requested part (title, meta or incFiles) | |
| string | $ln New line character |
Definition at line 412 of file html.class.php.
| getHtmlIncFiles | ( | $ | type, | |
| $ | ln = "\n" | |||
| ) | [protected] |
Get the HTML included files
| string | $type Docuement type (css or js) | |
| string | $ln New line character |
Definition at line 494 of file html.class.php.
| getHtmlMeta | ( | $ | ln = "\n" |
) | [protected] |
Get the HTML Meta
| string | $ln New line character |
Definition at line 464 of file html.class.php.
| getIncFiles | ( | ) |
| getIncludeTagFile | ( | $ | type, | |
| $ | files, | |||
| $ | dir = 'nyro', |
|||
| $ | media = 'screen' | |||
| ) |
Get the tag to include an external file.
| string | $type (css|js) | |
| array|string | $files List of files or a single file path | |
| string | $dir Where to get the file (nyro|web) | |
| string | $media Media info for css only |
Definition at line 532 of file html.class.php.
| getLayout | ( | ) | [inherited] |
| getLink | ( | $ | rel | ) |
Get a link content
| string | $rel Rel name |
Definition at line 148 of file html.class.php.
| getMeta | ( | $ | name | ) |
Get a meta content
| string | $name Meta name |
Definition at line 108 of file html.class.php.
| getMetaProperty | ( | $ | name | ) |
Get a meta property content
| string | $name Meta name |
Definition at line 128 of file html.class.php.
| getProxy | ( | ) | [inherited] |
Get the response proxy (used in the templates)
Definition at line 31 of file response/abstract.class.php.
| getStatus | ( | $ | name = false |
) | [inherited] |
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.
| getTitle | ( | ) |
| getUrlFile | ( | $ | type, | |
| $ | files, | |||
| $ | dir = 'nyro' | |||
| ) |
Get an URL for a CSS or JS file.
| string | $type (css|js) | |
| array|string | $files List of files or a single file path | |
| string | $dir Where to get the file (nyro|web) |
Definition at line 546 of file html.class.php.
| hasHeader | ( | $ | name | ) | [inherited] |
Check if a header is set
| string | $name Header name |
Definition at line 176 of file http.class.php.
| initBlocks | ( | $ | type | ) | [protected] |
Initialize the blocks array for the requested type
| string | $type |
Definition at line 193 of file html.class.php.
| initIncFiles | ( | $ | addDefaults = true |
) |
Init incFiles variables
| bool | $addDefaults Indicate if the default should be added |
Definition at line 44 of file html.class.php.
| mediaDownload | ( | $ | file, | |
| $ | forceDownload = false, |
|||
| $ | fileName = null, |
|||
| $ | delete = false | |||
| ) | [protected, inherited] |
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 | ( | ) | [inherited] |
Make the response to expire in 32 days
Definition at line 152 of file http.class.php.
| redirect | ( | $ | url, | |
| $ | status = 301 | |||
| ) | [inherited] |
Redirect the user with a header content
| string | $url | |
| int | $status |
Definition at line 463 of file http.class.php.
| send | ( | $ | headerOnly = false |
) |
Send The response
| bool | $headerOnly Send only the header and exit |
Reimplemented from response_http.
Definition at line 577 of file html.class.php.
| send | ( | ) | [abstract, inherited] |
Send The response
| sendFile | ( | $ | file, | |
| $ | name = null, |
|||
| $ | delete = false | |||
| ) | [inherited] |
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 | |||
| ) | [inherited] |
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 | ( | ) | [inherited] |
Send HTTP headers and cookies.
Definition at line 190 of file http.class.php.
| sendText | ( | $ | text | ) | [inherited] |
Send a text response (exit the programm)
| string | $text |
Reimplemented from response_abstract.
Definition at line 253 of file http.class.php.
| setAjaxlayout | ( | $ | ajaxLayout | ) | [inherited] |
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 | ) | [inherited] |
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 | |||
| ) | [inherited] |
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.
| setHtmlEltIntern | ( | $ | content | ) | [protected] |
Used by the send function to replace place holders set by getHtmlelt by actual content
| string | $content |
Definition at line 442 of file html.class.php.
| setlayout | ( | $ | layout | ) | [inherited] |
| setLink | ( | $ | rel, | |
| array $ | attributes | |||
| ) |
Set a link content
| string | $rel Rel name | |
| array | $attributes Link attributes |
Definition at line 158 of file html.class.php.
| setMeta | ( | $ | name, | |
| $ | value | |||
| ) |
Set a meta content
| string | $name Meta name | |
| string | $value Meta content |
Definition at line 118 of file html.class.php.
| setMetaAfter | ( | $ | name, | |
| $ | value, | |||
| $ | sep = ', |
|||
| ' | ||||
| ) |
Add a string after the acual meta, with a spearator if needed
| string | $name Meta Name | |
| string | $value Meta content | |
| string | $sep |
Definition at line 182 of file html.class.php.
| setMetaBefore | ( | $ | name, | |
| $ | value, | |||
| $ | sep = ', |
|||
| ' | ||||
| ) |
Add a string before the acual meta, with a spearator if needed
| string | $name Meta Name | |
| string | $value Meta content | |
| string | $sep |
Definition at line 169 of file html.class.php.
| setMetaProperty | ( | $ | name, | |
| $ | value | |||
| ) |
Set a meta property content
| string | $name Meta name | |
| string | $value Meta content |
Definition at line 138 of file html.class.php.
| setStatus | ( | $ | status | ) | [inherited] |
Set the reponse status by code
| int | $status |
Definition at line 49 of file http.class.php.
| setTitle | ( | $ | title | ) |
| setTitleInDes | ( | $ | titleInDes | ) |
Set the titleInDes setting
| false|string | $titleInDes The string to use or false to deactivate |
Definition at line 98 of file html.class.php.
| showFile | ( | $ | file | ) | [inherited] |
Show a file to the client
| string | $file File Path |
Definition at line 298 of file http.class.php.
$beforeOut = array() [protected, inherited] |
Definition at line 24 of file http.class.php.
$blocks = array() [protected] |
Definition at line 25 of file html.class.php.
$blocksJquery = array() [protected] |
Definition at line 32 of file html.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, inherited] |
Definition at line 17 of file http.class.php.
$incFiles [protected] |
Definition at line 18 of file html.class.php.
$proxy = null [protected, inherited] |
Definition at line 24 of file response/abstract.class.php.
1.7.1