HTMLPurifier_Lexer_DOMLex Klassenreferenz

Klassendiagramm für HTMLPurifier_Lexer_DOMLex:

Inheritance graph
[Legende]
Zusammengehörigkeiten von HTMLPurifier_Lexer_DOMLex:

Collaboration graph
[Legende]

Öffentliche Methoden

 __construct ()
 tokenizeHTML ($html, $config, $context)
 muteErrorHandler ($errno, $errstr)
 callbackUndoCommentSubst ($matches)
 callbackArmorCommentEntities ($matches)

Geschützte Methoden

 tokenizeDOM ($node, &$tokens, $collect=false)
 transformAttrToAssoc ($node_map)
 wrapHTML ($html, $config, $context)

Ausführliche Beschreibung

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.

Zu beachten:
Any empty elements will have empty tokens associated with them, even if this is prohibited by the spec. This is cannot be fixed until the spec comes into play.

PHP's DOM extension does not actually parse any entities, we use our own function to do that.

Warnung:
DOM tends to drop whitespace, which may wreak havoc on indenting. If this is a huge problem, due to the fact that HTML is hand edited and you are unable to get a parser cache that caches the the output of HTML Purifier while keeping the original HTML lying around, you may want to run Tidy on the resulting output or use HTMLPurifier_DirectLex

Definiert in Zeile 27 der Datei DOMLex.php.


Beschreibung der Konstruktoren und Destruktoren

__construct (  ) 

Erneute Implementation von HTMLPurifier_Lexer.

Definiert in Zeile 32 der Datei DOMLex.php.


Dokumentation der Elementfunktionen

callbackArmorCommentEntities ( matches  ) 

Callback function that entity-izes ampersands in comments so that callbackUndoCommentSubst doesn't clobber them

Definiert in Zeile 186 der Datei DOMLex.php.

callbackUndoCommentSubst ( matches  ) 

Callback function for undoing escaping of stray angled brackets in comments

Definiert in Zeile 178 der Datei DOMLex.php.

muteErrorHandler ( errno,
errstr 
)

An error handler that mutes all errors

Definiert in Zeile 172 der Datei DOMLex.php.

tokenizeDOM ( node,
&$  tokens,
collect = false 
) [protected]

Recursive function that tokenizes a node, putting it into an accumulator.

Parameter:
$node DOMNode to be tokenized.
$tokens Array-list of already tokenized tokens.
$collect Says whether or start and close are collected, set to false at first recursion because it's the implicit DIV tag you're dealing with.
Rückgabe:
Tokens of node appended to previously passed tokens.

Definiert in Zeile 84 der Datei DOMLex.php.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

tokenizeHTML ( string,
config,
context 
)

Lexes an HTML string into tokens.

Parameter:
$string String HTML.
Rückgabe:
HTMLPurifier_Token array representation of HTML.

Erneute Implementation von HTMLPurifier_Lexer.

Erneute Implementation in HTMLPurifier_Lexer_PH5P.

Definiert in Zeile 38 der Datei DOMLex.php.

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

transformAttrToAssoc ( node_map  )  [protected]

Converts a DOMNamedNodeMap of DOMAttr objects into an assoc array.

Parameter:
$attribute_list DOMNamedNodeMap of DOMAttr objects.
Rückgabe:
Associative array of attributes.

Definiert in Zeile 157 der Datei DOMLex.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

wrapHTML ( html,
config,
context 
) [protected]

Wraps an HTML fragment in the necessary HTML

Definiert in Zeile 193 der Datei DOMLex.php.

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen