|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| has_started () | |
| __call ($method, $arguments) | |
Static Public Member Functions | |
| static | early_error_content ($message, $moreinfourl, $link, $backtrace, $debuginfo=null) |
| static | early_error ($message, $moreinfourl, $link, $backtrace, $debuginfo=null) |
| static | early_notification ($message, $classes= 'notifyproblem') |
| static | plain_redirect_message ($encodedurl) |
| static | early_redirect_message ($encodedurl, $message, $delay) |
Static Protected Member Functions | |
| static | plain_page ($title, $content, $meta= '') |
Protected Attributes | |
| $initialising = false | |
This class solves the problem of how to initialise $OUTPUT.
The problem is caused be two factors
So, it is hard to find a single natural place during Moodle script execution, which we can guarantee is the right time to initialise $OUTPUT. Instead we adopt the following strategy
The only problem with that is, how do we initialise $OUTPUT on first use if, it is going to be used like $OUTPUT->somthing(...)? Well that is where this class comes in. Initially, we set up $OUTPUT = new bootstrap_renderer(). Then, when any method is called on that object, we initialise $OUTPUT, and pass the call on.
Note that this class is used before lib/outputlib.php has been loaded, so we must be careful referring to classes/functions from there, they may not be defined yet, and we must avoid fatal errors.
Definition at line 1317 of file setuplib.php.
| __call | ( | $ | method, |
| $ | arguments | ||
| ) |
Constructor - to be used by core code only.
| $method | |
| $arguments |
Definition at line 1339 of file setuplib.php.

| static early_error | ( | $ | message, |
| $ | moreinfourl, | ||
| $ | link, | ||
| $ | backtrace, | ||
| $ | debuginfo = null |
||
| ) | [static] |
This function should only be called by this class, or from exception handlers
| string | $message | error message |
| string | $moreinfourl | (ignored in early errors) |
| string | $link | (ignored in early errors) |
| array | $backtrace | |
| string | $debuginfo | extra information for developers |
Definition at line 1418 of file setuplib.php.


| static early_error_content | ( | $ | message, |
| $ | moreinfourl, | ||
| $ | link, | ||
| $ | backtrace, | ||
| $ | debuginfo = null |
||
| ) | [static] |
Returns nicely formatted error message in a div box.
| string | $message | error message |
| string | $moreinfourl | (ignored in early errors) |
| string | $link | (ignored in early errors) |
| array | $backtrace | |
| string | $debuginfo |
Definition at line 1386 of file setuplib.php.


| static early_notification | ( | $ | message, |
| $ | classes = 'notifyproblem' |
||
| ) | [static] |
Early notification message
| $message | ||
| string | $classes | usually notifyproblem or notifysuccess |
Definition at line 1485 of file setuplib.php.
| static early_redirect_message | ( | $ | encodedurl, |
| $ | message, | ||
| $ | delay | ||
| ) | [static] |
Early redirection page, used before full init of $PAGE global
| $encodedurl | redirect url |
| $message | redirect message |
| $delay | time in seconds |
Definition at line 1509 of file setuplib.php.


| has_started | ( | ) |
Have we started output yet?
Definition at line 1329 of file setuplib.php.
| static plain_page | ( | $ | title, |
| $ | content, | ||
| $ | meta = '' |
||
| ) | [static, protected] |
Output basic html page.
| $title | page title | |
| $content | page content | |
| string | $meta | meta tag |
Definition at line 1525 of file setuplib.php.


| static plain_redirect_message | ( | $ | encodedurl | ) | [static] |
Page should redirect message.
| $encodedurl | redirect url |
Definition at line 1495 of file setuplib.php.


$initialising = false [protected] |
Definition at line 1323 of file setuplib.php.