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


Public Member Functions | |
| execute ($tokens, $config, $context) | |
Protected Member Functions | |
| processToken ($token, $injector=-1) | |
Protected Attributes | |
| $tokens | |
| $t | |
| $stack | |
| $injectors | |
| $config | |
| $context | |
Takes tokens makes them well-formed (balance end tags, etc.)
Specification of the armor attributes this strategy uses:
Definition at line 14 of file MakeWellFormed.php.
| 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 47 of file MakeWellFormed.php.

| processToken | ( | $ | token, |
| $ | injector = -1 |
||
| ) | [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 479 of file MakeWellFormed.php.

$config [protected] |
Current instance of HTMLPurifier_Config.
Definition at line 40 of file MakeWellFormed.php.
$context [protected] |
Current instance of HTMLPurifier_Context.
Definition at line 45 of file MakeWellFormed.php.
$injectors [protected] |
Injectors active in this stream processing.
Definition at line 35 of file MakeWellFormed.php.
$stack [protected] |
Current nesting of elements.
Definition at line 30 of file MakeWellFormed.php.
$t [protected] |
Current index in $tokens.
Definition at line 25 of file MakeWellFormed.php.
$tokens [protected] |
Array stream of tokens being processed.
Definition at line 20 of file MakeWellFormed.php.