| extends | HTMLPurifier_Lexer | 
|---|
Parser that uses PHP 5's DOM extension (part of the core).
In PHP 5, the DOM XML extension was revamped into DOM and added to the core. It gives us a forgiving HTML parser, which we use to transform the HTML into a DOM, and then into the tokens. It is blazingly fast (for large documents, it performs twenty times faster than HTMLPurifier_Lexer_DirectLex,and is the default choice for PHP 5.
| Methods | ||||||||
|---|---|---|---|---|---|---|---|---|
| 
					
	public
					
					
				 | __construct()Overrides | # | ||||||
| 
					
	public
					
					
				 | tokenizeHTML(string $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context): HTMLPurifier_Token[]
		Lexes an HTML string into tokens.
	 Lexes an HTML string into tokens. Returnsarray representation of HTML. OverridesOverriden by | # | ||||||
| 
					
	protected
					
					
				 | tokenizeDOM(DOMNode $node, HTMLPurifier_Token[] &$tokens, $config): HTMLPurifier_Token
		Iterative function that tokenizes a node, putting it into an accumulator.
To iterate is human, to recurse divine - L.…
	 Iterative function that tokenizes a node, putting it into an accumulator. To iterate is human, to recurse divine - L. Peter Deutsch Parameters
 Returnsof node appended to previously passed tokens. | # | ||||||
| 
					
	protected
					
					
				 | getTagName(DOMNode $node)
		Portably retrieve the tag name of a node; deals with older versions
of libxml like 2.7.6
	 Portably retrieve the tag name of a node; deals with older versions of libxml like 2.7.6 | # | ||||||
| 
					
	protected
					
					
				 | getData(DOMNode $node)
		Portably retrieve the data of a node; deals with older versions
of libxml like 2.7.6
	 Portably retrieve the data of a node; deals with older versions of libxml like 2.7.6 | # | ||||||
| 
					
	protected
					
					
				 | createStartNode(DOMNode $node, HTMLPurifier_Token[] &$tokens, bool $collect, $config): boolParameters
 Returnsif the token needs an endtoken | # | ||||||
| 
					
	protected
					
					
				 | createEndNode(DOMNode $node, HTMLPurifier_Token[] &$tokens) | # | ||||||
| 
					
	protected
					
					
				 | transformAttrToAssoc(DOMNamedNodeMap $node_map): array
		Converts a DOMNamedNodeMap of DOMAttr objects into an assoc array.
	 Converts a DOMNamedNodeMap of DOMAttr objects into an assoc array. Parameters
 ReturnsAssociative array of attributes. | # | ||||||
| 
					
	public
					
					
				 | muteErrorHandler(int $errno, string $errstr)
		An error handler that mutes all errors
	 An error handler that mutes all errors | # | ||||||
| 
					
	public
					
					
				 | callbackUndoCommentSubst(array $matches): string
		Callback function for undoing escaping of stray angled brackets
in comments
	 Callback function for undoing escaping of stray angled brackets in comments | # | ||||||
| 
					
	public
					
					
				 | callbackArmorCommentEntities(array $matches): string
		Callback function that entity-izes ampersands in comments so that
callbackUndoCommentSubst doesn't clobber them
	 Callback function that entity-izes ampersands in comments so that callbackUndoCommentSubst doesn't clobber them | # | ||||||
| 
					
	protected
					
					
				 | wrapHTML(string $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context, $use_div = true): string
		Wraps an HTML fragment in the necessary HTML
	 Wraps an HTML fragment in the necessary HTML | # | ||||||
| Methods inherited from HTMLPurifier_Lexer | 
|---|
| create(), parseText(), parseAttr(), parseData(), escapeCDATA(), escapeCommentedCDATA(), removeIEConditional(), CDATACallback(), normalize(), extractBody() | 
| Properties inherited from HTMLPurifier_Lexer | 
|---|
| $tracksLineNumbers, $_special_entity2str |