PHP Class HTMLPurifier_Lexer_DirectLex, yii

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.
Inheritance: extends HTMLPurifier_Lexer
Afficher le fichier Open project: yiisoft/yii Class Usage Examples

Méthodes publiques

Свойство Type Description
$tracksLineNumbers

Protected Properties

Свойство Type Description
$_whitespace Whitespace characters for str(c)spn.

Méthodes publiques

Méthode Description
parseAttributeString ( string $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array Takes the inside of an HTML tag and makes an assoc array of attributes.
tokenizeHTML ( String $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array | HTMLPurifier_Token[]

Méthodes protégées

Méthode Description
scriptCallback ( $matches ) : string Callback function for script CDATA fudge
substrCount ( string $haystack, string $needle, integer $offset, integer $length ) : integer PHP 5.0.x compatible substr_count that implements offset and length

Method Details

parseAttributeString() public méthode

Takes the inside of an HTML tag and makes an assoc array of attributes.
public parseAttributeString ( string $string, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array
$string string Inside of tag excluding name.
$config HTMLPurifier_Config
$context HTMLPurifier_Context
Résultat array Assoc array of attributes.

scriptCallback() protected méthode

Callback function for script CDATA fudge
protected scriptCallback ( $matches ) : string
Résultat string

substrCount() protected méthode

PHP 5.0.x compatible substr_count that implements offset and length
protected substrCount ( string $haystack, string $needle, integer $offset, integer $length ) : integer
$haystack string
$needle string
$offset integer
$length integer
Résultat integer

tokenizeHTML() public méthode

public tokenizeHTML ( String $html, HTMLPurifier_Config $config, HTMLPurifier_Context $context ) : array | HTMLPurifier_Token[]
$html String
$config HTMLPurifier_Config
$context HTMLPurifier_Context
Résultat array | HTMLPurifier_Token[]

Property Details

$_whitespace protected_oe property

Whitespace characters for str(c)spn.
protected $_whitespace

$tracksLineNumbers public_oe property

public $tracksLineNumbers