PHP Class HTMLPurifier_EntityParser, yii

Afficher le fichier Open project: yiisoft/yii

Protected Properties

Свойство Type Description
$_entity_lookup Reference to entity lookup table.
$_special_dec2str Decimal to parsed string conversion table for special entities.
$_special_ent2dec Stripped entity names to decimal conversion table for special entities.
$_substituteEntitiesRegex Callback regex string for parsing entities.

Méthodes publiques

Méthode Description
substituteNonSpecialEntities ( string $string ) : 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.
substituteSpecialEntities ( string $string ) : string Substitutes only special entities with their parsed equivalents.

Méthodes protégées

Méthode Description
nonSpecialEntityCallback ( array $matches ) : string Callback function for substituteNonSpecialEntities() that does the work.
specialEntityCallback ( array $matches ) : string Callback function for substituteSpecialEntities() that does the work.

Method Details

nonSpecialEntityCallback() protected méthode

Callback function for substituteNonSpecialEntities() that does the work.
protected nonSpecialEntityCallback ( array $matches ) : string
$matches array 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ésultat string Replacement string.

specialEntityCallback() protected méthode

This callback has same syntax as nonSpecialEntityCallback().
protected specialEntityCallback ( array $matches ) : string
$matches array 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ésultat string Replacement string.

substituteNonSpecialEntities() public méthode

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.
public substituteNonSpecialEntities ( string $string ) : string
$string string String to have non-special entities parsed.
Résultat string Parsed string.

substituteSpecialEntities() public méthode

Substitutes only special entities with their parsed equivalents.
public substituteSpecialEntities ( string $string ) : string
$string string String to have non-special entities parsed.
Résultat string Parsed string.

Property Details

$_entity_lookup protected_oe property

Reference to entity lookup table.
protected $_entity_lookup

$_special_dec2str protected_oe property

Decimal to parsed string conversion table for special entities.
protected $_special_dec2str

$_special_ent2dec protected_oe property

Stripped entity names to decimal conversion table for special entities.
protected $_special_ent2dec

$_substituteEntitiesRegex protected_oe property

Callback regex string for parsing entities.
protected $_substituteEntitiesRegex