API - XOOPS 2.5.11 Beta 2
By monxoops.fr
HTMLPurifier_TokenFactory Class Reference

Public Member Functions

 __construct ()
 
 createStart ($name, $attr=array())
 
 createEnd ($name)
 
 createEmpty ($name, $attr=array())
 
 createText ($data)
 
 createComment ($data)
 

Detailed Description

Factory for token generation.

Note
Doing some benchmarking indicates that the new operator is much slower than the clone operator (even discounting the cost of the constructor). This class is for that optimization. Other then that, there's not much point as we don't maintain parallel HTMLPurifier_Token hierarchies (the main reason why you'd want to use an abstract factory).
Todo:
Port DirectLex to use this

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Generates blank prototypes for cloning.

Member Function Documentation

◆ createComment()

createComment (   $data)

Creates a HTMLPurifier_Token_Comment.

Parameters
string$dataData of comment token
Returns
HTMLPurifier_Token_Comment Generated HTMLPurifier_Token_Comment

◆ createEmpty()

createEmpty (   $name,
  $attr = array() 
)

Creates a HTMLPurifier_Token_Empty.

Parameters
string$nameTag name
array$attrAssociative array of attributes
Returns
HTMLPurifier_Token_Empty Generated HTMLPurifier_Token_Empty

◆ createEnd()

createEnd (   $name)

Creates a HTMLPurifier_Token_End.

Parameters
string$nameTag name
Returns
HTMLPurifier_Token_End Generated HTMLPurifier_Token_End

◆ createStart()

createStart (   $name,
  $attr = array() 
)

Creates a HTMLPurifier_Token_Start.

Parameters
string$nameTag name
array$attrAssociative array of attributes
Returns
HTMLPurifier_Token_Start Generated HTMLPurifier_Token_Start

◆ createText()

createText (   $data)

Creates a HTMLPurifier_Token_Text.

Parameters
string$dataData of text token
Returns
HTMLPurifier_Token_Text Generated HTMLPurifier_Token_Text

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