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
Exibir arquivo Open project: yiisoft/yii Class Usage Examples

Public Properties

Property Type Description
$tracksLineNumbers

Protected Properties

Property Type Description
$_whitespace Whitespace characters for str(c)spn.

Public Methods

Method 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[]

Protected Methods

Method 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 method

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
return array Assoc array of attributes.

scriptCallback() protected method

Callback function for script CDATA fudge
protected scriptCallback ( $matches ) : string
return string

substrCount() protected method

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
return integer

tokenizeHTML() public method

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

Property Details

$_whitespace protected_oe property

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

$tracksLineNumbers public_oe property

public $tracksLineNumbers