HTMLPurifier_EntityParser Klassenreferenz


Öffentliche Methoden

 substituteNonSpecialEntities ($string)
 substituteSpecialEntities ($string)

Geschützte Methoden

 nonSpecialEntityCallback ($matches)
 specialEntityCallback ($matches)

Geschützte Attribute

 $_entity_lookup
 $_substituteEntitiesRegex
 $_special_dec2str
 $_special_ent2dec

Ausführliche Beschreibung

Handles referencing and derefencing character entities

Definiert in Zeile 10 der Datei EntityParser.php.


Dokumentation der Elementfunktionen

nonSpecialEntityCallback ( matches  )  [protected]

Callback function for substituteNonSpecialEntities() that does the work.

Parameter:
$matches PCRE matches array, with 0 the entire match, and either index 1, 2 or 3 set with a hex value, dec value, or string (respectively).
Rückgabe:
Replacement string.

Definiert in Zeile 75 der Datei EntityParser.php.

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

specialEntityCallback ( matches  )  [protected]

Callback function for substituteSpecialEntities() that does the work.

This callback has same syntax as nonSpecialEntityCallback().

Parameter:
$matches PCRE-style matches array, with 0 the entire match, and either index 1, 2 or 3 set with a hex value, dec value, or string (respectively).
Rückgabe:
Replacement string.

Definiert in Zeile 126 der Datei EntityParser.php.

substituteNonSpecialEntities ( string  ) 

Substitutes non-special entities with their parsed equivalents. Since running this whenever you have parsed character is t3h 5uck, we run it before everything else.

Parameter:
$string String to have non-special entities parsed.
Rückgabe:
Parsed string.

Definiert in Zeile 57 der Datei EntityParser.php.

substituteSpecialEntities ( string  ) 

Substitutes only special entities with their parsed equivalents.

We try to avoid calling this function because otherwise, it would have to be called a lot (for every parsed section).

Parameter:
$string String to have non-special entities parsed.
Rückgabe:
Parsed string.

Definiert in Zeile 109 der Datei EntityParser.php.


Dokumentation der Datenelemente

$_entity_lookup [protected]

Reference to entity lookup table.

Definiert in Zeile 16 der Datei EntityParser.php.

$_special_dec2str [protected]

Initialisierung:

            array(
                    34 => '"',
                    38 => '&',
                    39 => "'",
                    60 => '<',
                    62 => '>'
            )
Decimal to parsed string conversion table for special entities.

Definiert in Zeile 29 der Datei EntityParser.php.

$_special_ent2dec [protected]

Initialisierung:

            array(
                    'quot' => 34,
                    'amp'  => 38,
                    'lt'   => 60,
                    'gt'   => 62
            )
Stripped entity names to decimal conversion table for special entities.

Definiert in Zeile 41 der Datei EntityParser.php.

$_substituteEntitiesRegex [protected]

Initialisierung:

'/&(?:[#]x([a-fA-F0-9]+)|[#]0*(\d+)|([A-Za-z_:][A-Za-z0-9.\-_:]*));?/'
Callback regex string for parsing entities.

Definiert in Zeile 21 der Datei EntityParser.php.


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