Response

Response data

Returns a response object, which handles the information that is given back to browser.

Example

Add content to response

$this->get('response')->addContent('<h1>Hello!</h1>');

Set information

Set page title and content

$this->get('response')
  ->setTitle('Title text')
  ->setHeader('Page header')
  ->addContent('Page content');

Full method list

Method Return  Description
setTitle() this Set page Title. (Is shown as page name in browser).
setHeader() this Set page header.
setHeaderIcon() this Set page header icon.
setHeaderMenu() this Set ajax source name for menu
setReturnUrl() this Set return -Url link.
addContent(val) this Add content to page.
clearContent() this Clears content that is set before.

Assets

Method Return  Description
addJavascript($filename) this Add js asset.
addJavascriptCode($code) this Add script to page SCRIPT section.
addJavascriptCodeEnd($code) this Add script to page SCRIPT section in end of the document.
addStylesheet($file) this Add css asset.
addStylesheetCode($code) this Add css code to STYLE section.

Config

Method Return  Description
setExecutionLimit($string) this Set limit for page execution mem and time from now on: unlimited, max, heavy, min. Default: normal (in in loop, gives more time for each loop)
setMemoryLimit($limit) this Set limit for mem usage. Example: '1G'
setTimeLimit($secs) this Set limit for execution time (from this point forward).