ILIAS
eassessment Revision 61809
|
Generates HTML from tokens. More...
Public Member Functions | |
__construct ($config, $context) | |
generateFromTokens ($tokens) | |
Generates HTML from an array of tokens. | |
generateFromToken ($token) | |
Generates HTML from a single token. | |
generateScriptFromToken ($token) | |
Special case processor for the contents of script tags. | |
generateAttributes ($assoc_array_of_attributes, $element=false) | |
Generates attribute declarations from attribute array. | |
escape ($string, $quote=ENT_COMPAT) | |
Escapes raw text data. |
Protected Attributes | |
$config | |
Configuration for the generator. |
Private Attributes | |
$_xhtml = true | |
Whether or not generator should produce XML output. | |
$_scriptFix = false | |
:HACK: Whether or not generator should comment the insides of <script> tags | |
$_def | |
Cache of HTMLDefinition during HTML output to determine whether or not attributes should be minimized. | |
$_sortAttr | |
Cache of Output.SortAttr. |
Generates HTML from tokens.
Refactor interface so that configuration/context is determined upon instantiation, no need for messy generateFromTokens() calls
Make some of the more internal functions protected, and have unit tests work around that
Definition at line 10 of file Generator.php.
HTMLPurifier_Generator::__construct | ( | $config, | |
$context | |||
) |
$config | Instance of HTMLPurifier_Config |
$context | Instance of HTMLPurifier_Context |
Definition at line 43 of file Generator.php.
References $config.
HTMLPurifier_Generator::escape | ( | $string, | |
$quote = ENT_COMPAT |
|||
) |
Escapes raw text data.
$string | String data to escape for HTML. |
$quote | Quoting style, like htmlspecialchars. ENT_NOQUOTES is permissible for non-attribute output. |
Definition at line 177 of file Generator.php.
Referenced by generateAttributes(), and generateFromToken().
HTMLPurifier_Generator::generateAttributes | ( | $assoc_array_of_attributes, | |
$element = false |
|||
) |
Generates attribute declarations from attribute array.
$assoc_array_of_attributes | Attribute array |
$element | Name of element attributes are for, used to check attribute minimization. |
Definition at line 149 of file Generator.php.
References escape().
Referenced by generateFromToken().
HTMLPurifier_Generator::generateFromToken | ( | $token | ) |
Generates HTML from a single token.
$token | HTMLPurifier_Token object. |
Definition at line 100 of file Generator.php.
References escape(), and generateAttributes().
Referenced by generateFromTokens(), and generateScriptFromToken().
HTMLPurifier_Generator::generateFromTokens | ( | $tokens | ) |
Generates HTML from an array of tokens.
$tokens | Array of HTMLPurifier_Token |
$config | HTMLPurifier_Config object |
Definition at line 57 of file Generator.php.
References $tidy, generateFromToken(), and generateScriptFromToken().
HTMLPurifier_Generator::generateScriptFromToken | ( | $token | ) |
Special case processor for the contents of script tags.
Definition at line 134 of file Generator.php.
References $data, and generateFromToken().
Referenced by generateFromTokens().
|
private |
Cache of HTMLDefinition during HTML output to determine whether or not attributes should be minimized.
Definition at line 27 of file Generator.php.
|
private |
:HACK: Whether or not generator should comment the insides of <script> tags
Definition at line 21 of file Generator.php.
|
private |
Cache of Output.SortAttr.
Definition at line 32 of file Generator.php.
|
private |
Whether or not generator should produce XML output.
Definition at line 16 of file Generator.php.
|
protected |
Configuration for the generator.
Definition at line 37 of file Generator.php.
Referenced by __construct().