|
ILIAS
Release_4_0_x_branch Revision 61816
|
Takes tokens makes them well-formed (balance end tags, etc.) More...
Inheritance diagram for HTMLPurifier_Strategy_MakeWellFormed:
Collaboration diagram for HTMLPurifier_Strategy_MakeWellFormed:Public Member Functions | |
| execute ($tokens, $config, $context) | |
| Executes the strategy on the tokens. | |
Protected Member Functions | |
| processToken ($token, $injector=-1) | |
| Processes arbitrary token values for complicated substitution patterns. | |
Protected Attributes | |
| $tokens | |
| Array stream of tokens being processed. | |
| $t | |
| Current index in $tokens. | |
| $stack | |
| Current nesting of elements. | |
| $injectors | |
| Injectors active in this stream processing. | |
| $config | |
| Current instance of HTMLPurifier_Config. | |
| $context | |
| Current instance of HTMLPurifier_Context. | |
Private Member Functions | |
| insertBefore ($token) | |
| Inserts a token before the current token. | |
| remove () | |
| Removes current token. | |
| swap ($token) | |
| Swap current token with new token. | |
Takes tokens makes them well-formed (balance end tags, etc.)
Definition at line 6 of file MakeWellFormed.php.
| HTMLPurifier_Strategy_MakeWellFormed::execute | ( | $tokens, | |
| $config, | |||
| $context | |||
| ) |
Executes the strategy on the tokens.
| $tokens | Array of HTMLPurifier_Token objects to be operated on. |
| $config | Configuration options |
Reimplemented from HTMLPurifier_Strategy.
Definition at line 39 of file MakeWellFormed.php.
References $config, $context, $error, $injectors, $ok, $size, $stack, $t, $tokens, $type, elseif(), insertBefore(), processToken(), and swap().
Here is the call graph for this function:
|
private |
Inserts a token before the current token.
Cursor now points to this token
Definition at line 436 of file MakeWellFormed.php.
Referenced by execute().
Here is the caller graph for this function:
|
protected |
Processes arbitrary token values for complicated substitution patterns.
In general:
If $token is an array, it is a list of tokens to substitute for the current token. These tokens then get individually processed. If there is a leading integer in the list, that integer determines how many tokens from the stream should be removed.
If $token is a regular token, it is swapped with the current token.
If $token is false, the current token is deleted.
If $token is an integer, that number of tokens (with the first token being the current one) will be deleted.
| $token | Token substitution value |
| $injector | Injector that performed the substitution; default is if this is not an injector related operation. |
Definition at line 406 of file MakeWellFormed.php.
Referenced by execute().
Here is the caller graph for this function:
|
private |
Removes current token.
Cursor now points to new token occupying previously occupied space.
Definition at line 444 of file MakeWellFormed.php.
|
private |
Swap current token with new token.
Cursor points to new token (no change).
Definition at line 451 of file MakeWellFormed.php.
References $t.
Referenced by execute().
Here is the caller graph for this function:
|
protected |
Current instance of HTMLPurifier_Config.
Definition at line 32 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current instance of HTMLPurifier_Context.
Definition at line 37 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Injectors active in this stream processing.
Definition at line 27 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current nesting of elements.
Definition at line 22 of file MakeWellFormed.php.
Referenced by execute().
|
protected |
Current index in $tokens.
Definition at line 17 of file MakeWellFormed.php.
|
protected |
Array stream of tokens being processed.
Definition at line 12 of file MakeWellFormed.php.
Referenced by execute().