ILIAS
Release_5_0_x_branch Revision 61816
|
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= '') | |
Generates attribute declarations from attribute array. | |
escape ($string, $quote=null) | |
Escapes raw text data. |
Protected Attributes | |
$config | |
Configuration for the generator HTMLPurifier_Config. |
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. | |
$_flashCompat | |
Cache of Output.FlashCompat. | |
$_innerHTMLFix | |
Cache of Output.FixInnerHTML. | |
$_flashStack = array() | |
Stack for keeping track of object information when outputting IE compatibility code. |
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 | |||
) |
HTMLPurifier_Config | $config | |
HTMLPurifier_Context | $context |
Definition at line 67 of file Generator.php.
References $config.
HTMLPurifier_Generator::escape | ( | $string, | |
$quote = null |
|||
) |
Escapes raw text data.
string | $string | String data to escape for HTML. |
int | $quote | Quoting style, like htmlspecialchars. ENT_NOQUOTES is permissible for non-attribute output. |
Definition at line 275 of file Generator.php.
Referenced by generateAttributes(), and generateFromToken().
HTMLPurifier_Generator::generateAttributes | ( | $assoc_array_of_attributes, | |
$element = '' |
|||
) |
Generates attribute declarations from attribute array.
array | $assoc_array_of_attributes | Attribute array |
string | $element | Name of element attributes are for, used to check attribute minimization. |
Definition at line 211 of file Generator.php.
References escape().
Referenced by generateFromToken().
HTMLPurifier_Generator::generateFromToken | ( | $token | ) |
Generates HTML from a single token.
HTMLPurifier_Token | $token | HTMLPurifier_Token object. |
Definition at line 139 of file Generator.php.
References escape(), and generateAttributes().
Referenced by generateFromTokens(), and generateScriptFromToken().
HTMLPurifier_Generator::generateFromTokens | ( | $tokens | ) |
Generates HTML from an array of tokens.
HTMLPurifier_Token[] | $tokens Array of HTMLPurifier_Token |
Definition at line 83 of file Generator.php.
References $size, generateFromToken(), and generateScriptFromToken().
HTMLPurifier_Generator::generateScriptFromToken | ( | $token | ) |
Special case processor for the contents of script tags.
HTMLPurifier_Token | $token | HTMLPurifier_Token object. |
Definition at line 193 of file Generator.php.
References generateFromToken().
Referenced by generateFromTokens().
|
private |
Cache of HTMLDefinition during HTML output to determine whether or not attributes should be minimized.
Definition at line 30 of file Generator.php.
|
private |
|
private |
Stack for keeping track of object information when outputting IE compatibility code.
array
Definition at line 55 of file Generator.php.
|
private |
|
private |
:HACK: Whether or not generator should comment the insides of <script> tags.
bool
Definition at line 23 of file Generator.php.
|
private |
|
private |
Whether or not generator should produce XML output.
bool
Definition at line 17 of file Generator.php.
|
protected |
Configuration for the generator HTMLPurifier_Config.
Definition at line 61 of file Generator.php.
Referenced by __construct().