API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_Lexer_DirectLex Class Reference
Inheritance diagram for HTMLPurifier_Lexer_DirectLex:
Collaboration diagram for HTMLPurifier_Lexer_DirectLex:

Public Member Functions

 tokenizeHTML ($html, $config, $context)
 
 parseAttributeString ($string, $config, $context)
 
- Public Member Functions inherited from HTMLPurifier_Lexer
 __construct ()
 
 parseText ($string, $config)
 
 parseAttr ($string, $config)
 
 parseData ($string, $is_attr, $config)
 
 tokenizeHTML ($string, $config, $context)
 
 normalize ($html, $config, $context)
 
 extractBody ($html)
 

Data Fields

 $tracksLineNumbers = true
 
- Data Fields inherited from HTMLPurifier_Lexer
 $tracksLineNumbers = false
 

Protected Member Functions

 scriptCallback ($matches)
 
 substrCount ($haystack, $needle, $offset, $length)
 

Protected Attributes

 $_whitespace = "\x20\x09\x0D\x0A"
 
- Protected Attributes inherited from HTMLPurifier_Lexer
 $_special_entity2str
 

Additional Inherited Members

- Static Public Member Functions inherited from HTMLPurifier_Lexer
static create ($config)
 
- Static Protected Member Functions inherited from HTMLPurifier_Lexer
static escapeCDATA ($string)
 
static escapeCommentedCDATA ($string)
 
static removeIEConditional ($string)
 
static CDATACallback ($matches)
 

Detailed Description

Our in-house implementation of a parser.

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.

Todo:
Reread XML spec and document differences.

Member Function Documentation

◆ parseAttributeString()

parseAttributeString (   $string,
  $config,
  $context 
)

Takes the inside of an HTML tag and makes an assoc array of attributes.

Parameters
string$stringInside of tag excluding name.
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
array Assoc array of attributes.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scriptCallback()

scriptCallback (   $matches)
protected

Callback function for script CDATA fudge

Parameters
array$matches,inform of array(opening tag, contents, closing tag)
Returns
string

◆ substrCount()

substrCount (   $haystack,
  $needle,
  $offset,
  $length 
)
protected

PHP 5.0.x compatible substr_count that implements offset and length

Parameters
string$haystack
string$needle
int$offset
int$length
Returns
int
Here is the caller graph for this function:

◆ tokenizeHTML()

tokenizeHTML (   $html,
  $config,
  $context 
)
Parameters
String$html
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
array|HTMLPurifier_Token[]

Reimplemented from HTMLPurifier_Lexer.

Here is the call graph for this function:

Field Documentation

◆ $_whitespace

$_whitespace = "\x20\x09\x0D\x0A"
protected

Whitespace characters for str(c)spn. @type string

◆ $tracksLineNumbers

$tracksLineNumbers = true

@type bool


The documentation for this class was generated from the following file: