MediaWiki
REL1_22
|
Utility class used by CSSJanus that tokenizes and untokenizes things we want to protect from being janused. More...
Public Member Functions | |
__construct ($regex, $token) | |
Constructor. | |
detokenize ($str) | |
Replace tokens with their originals. | |
tokenize ($str) | |
Replace all occurrences of $regex in $str with a token and remember the original strings. | |
Public Attributes | |
$token | |
Private Member Functions | |
detokenizeCallback ($matches) | |
tokenizeCallback ($matches) | |
Private Attributes | |
$originals | |
$regex |
Utility class used by CSSJanus that tokenizes and untokenizes things we want to protect from being janused.
Definition at line 362 of file CSSJanus.php.
CSSJanus_Tokenizer::__construct | ( | $ | regex, |
$ | token | ||
) |
CSSJanus_Tokenizer::detokenize | ( | $ | str | ) |
Replace tokens with their originals.
If multiple strings were tokenized, it's important they be detokenized in exactly the SAME ORDER.
string | $str | previously run through tokenize() |
Definition at line 402 of file CSSJanus.php.
CSSJanus_Tokenizer::detokenizeCallback | ( | $ | matches | ) | [private] |
CSSJanus_Tokenizer::tokenize | ( | $ | str | ) |
Replace all occurrences of $regex in $str with a token and remember the original strings.
string | $str | to tokenize |
Definition at line 383 of file CSSJanus.php.
References array().
CSSJanus_Tokenizer::tokenizeCallback | ( | $ | matches | ) | [private] |
CSSJanus_Tokenizer::$originals [private] |
Definition at line 364 of file CSSJanus.php.
CSSJanus_Tokenizer::$regex [private] |
Definition at line 363 of file CSSJanus.php.
Referenced by __construct().
CSSJanus_Tokenizer::$token |
Definition at line 363 of file CSSJanus.php.
Referenced by __construct().