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


Public Member Functions | |
| tokenizeHTML ($html, $config, $context) | |
| parseAttributeString ($string, $config, $context) | |
Data Fields | |
| $tracksLineNumbers = true | |
Protected Member Functions | |
| scriptCallback ($matches) | |
| substrCount ($haystack, $needle, $offset, $length) | |
Protected Attributes | |
| $_whitespace = "\x20\x09\x0D\x0A" | |
Our in-house implementation of a parser.
A pure PHP parser, DirectLex has absolutely no dependencies, making it a reasonably good default for PHP4. Written with efficiency in mind, it can be four times faster than HTMLPurifier_Lexer_PEARSax3, although it pales in comparison to HTMLPurifier_Lexer_DOMLex.
Definition at line 13 of file DirectLex.php.
| parseAttributeString | ( | $ | string, |
| $ | config, | ||
| $ | context | ||
| ) |
Takes the inside of an HTML tag and makes an assoc array of attributes.
| $string | Inside of tag excluding name. |
Definition at line 342 of file DirectLex.php.


| scriptCallback | ( | $ | matches | ) | [protected] |
Callback function for script CDATA fudge
| $matches,in | form of array(opening tag, contents, closing tag) |
Definition at line 27 of file DirectLex.php.
| substrCount | ( | $ | haystack, |
| $ | needle, | ||
| $ | offset, | ||
| $ | length | ||
| ) | [protected] |
PHP 5.0.x compatible substr_count that implements offset and length
Definition at line 323 of file DirectLex.php.

| tokenizeHTML | ( | $ | string, |
| $ | config, | ||
| $ | context | ||
| ) |
Lexes an HTML string into tokens.
| $string | String HTML. |
Reimplemented from HTMLPurifier_Lexer.
Definition at line 31 of file DirectLex.php.

$_whitespace = "\x20\x09\x0D\x0A" [protected] |
Whitespace characters for str(c)spn.
Definition at line 21 of file DirectLex.php.
| $tracksLineNumbers = true |
Whether or not this lexer implements line-number/column-number tracking. If it does, set to true.
Reimplemented from HTMLPurifier_Lexer.
Definition at line 16 of file DirectLex.php.