|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct () | |
| prepareGenerator ($config) | |
Protected Member Functions | |
| start ($tag, $attr=array()) | |
| end ($tag) | |
| element ($tag, $contents, $attr=array(), $escape=true) | |
| elementEmpty ($tag, $attr=array()) | |
| text ($text) | |
| row ($name, $value) | |
| escape ($string) | |
| listify ($array, $polite=false) | |
| getClass ($obj, $sec_prefix= '') | |
Protected Attributes | |
| $generator | |
| $config | |
Definition at line 6 of file Printer.php.
| __construct | ( | ) |
Initialize $generator.
Definition at line 22 of file Printer.php.

Prints a complete element with content inside
| $tag | Tag name |
| $contents | Element contents |
| $attr | Tag attributes |
| $escape | Bool whether or not to escape contents |
Definition at line 68 of file Printer.php.


| elementEmpty | ( | $ | tag, |
| $ | attr = array() |
||
| ) | [protected] |
| end | ( | $ | tag | ) | [protected] |
Returns an end teg
| $tag | Tag name |
Definition at line 55 of file Printer.php.

| escape | ( | $ | string | ) | [protected] |
Escapes a string for HTML output.
| $string | String to escape |
Definition at line 105 of file Printer.php.


| getClass | ( | $ | obj, |
| $ | sec_prefix = '' |
||
| ) | [protected] |
Retrieves the class of an object without prefixes, as well as metadata
| $obj | Object to determine class of |
| $prefix | Further prefix to remove |
Definition at line 134 of file Printer.php.

| listify | ( | $ | array, |
| $ | polite = false |
||
| ) | [protected] |
Takes a list of strings and turns them into a single list
| $array | List of strings |
| $polite | Bool whether or not to add an end before the last |
Definition at line 116 of file Printer.php.

| prepareGenerator | ( | $ | config | ) |
Give generator necessary configuration if possible
Definition at line 28 of file Printer.php.

| row | ( | $ | name, |
| $ | value | ||
| ) | [protected] |
Prints a simple key/value row in a table.
| $name | Key |
| $value | Value |
Definition at line 91 of file Printer.php.


Main function that renders object or aspect of that object
| $tag | Tag name |
| $attr | Attribute array |
Definition at line 45 of file Printer.php.

| text | ( | $ | text | ) | [protected] |
$config [protected] |
Instance of HTMLPurifier_Config, for easy access
Definition at line 17 of file Printer.php.
$generator [protected] |
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Definition at line 12 of file Printer.php.