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

Public Member Functions

 setup ($config)
 getFixesForLevel ($level)
 makeFixesForLevel ($fixes)
 populate ($fixes)
 getFixType ($name)
 makeFixes ()
- Public Member Functions inherited from HTMLPurifier_HTMLModule
 getChildDef ($def)
 addElement ($element, $type, $contents, $attr_includes=array(), $attr=array())
 addBlankElement ($element)
 addElementToContentSet ($element, $type)
 parseContents ($contents)
 mergeInAttrIncludes (&$attr, $attr_includes)
 makeLookup ($list)
 setup ($config)

Data Fields

 $levels = array(0 => 'none', 'light', 'medium', 'heavy')
 $defaultLevel = null
- Data Fields inherited from HTMLPurifier_HTMLModule
 $elements = array()
 $info = array()
 $content_sets = array()
 $attr_collections = array()
 $info_tag_transform = array()
 $info_attr_transform_pre = array()
 $info_attr_transform_post = array()
 $info_injector = array()
 $defines_child_def = false
 $safe = true

Detailed Description

Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.

Figure out how to protect some of these methods/properties

Member Function Documentation

◆ getFixesForLevel()

getFixesForLevel (   $level)

Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it.

string$levellevel identifier, see $levels for valid values
array Lookup up table of fixes
Here is the caller graph for this function:

◆ getFixType()

getFixType (   $name)

Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix

$nameString name of fix
array(string $fix_type, array $fix_parameters)
$fix_parameters is type dependant, see populate() for usage of these parameters
Here is the caller graph for this function:

◆ makeFixes()

makeFixes ( )

Defines all fixes the module will perform in a compact associative array of fix name to fix implementation.


Reimplemented in HTMLPurifier_HTMLModule_Tidy_Name, HTMLPurifier_HTMLModule_Tidy_Proprietary, HTMLPurifier_HTMLModule_Tidy_Strict, HTMLPurifier_HTMLModule_Tidy_XHTML, and HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4.

Here is the caller graph for this function:

◆ makeFixesForLevel()

makeFixesForLevel (   $fixes)

Dynamically populates the $fixesForLevel member variable using the fixes array. It may be custom overloaded, used in conjunction with $defaultLevel, or not used at all.

Here is the caller graph for this function:

◆ populate()

populate (   $fixes)

Populates the module with transforms and other special-case code based on a list of fixes passed to it

array$fixesLookup table of fixes to activate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup()

setup (   $config)

Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function.

Wildcard matching and error reporting when an added or subtracted fix has no effect.

Reimplemented from HTMLPurifier_HTMLModule.

Here is the call graph for this function:

Field Documentation

◆ $defaultLevel

$defaultLevel = null

Default level to place all fixes in. Disabled by default. @type string

◆ $fixesForLevel

Initial value:
= array(
'light' => array(),
'medium' => array(),
'heavy' => array()

Lists of fixes used by getFixesForLevel(). Format is: HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2'); @type array

◆ $levels

$levels = array(0 => 'none', 'light', 'medium', 'heavy')

List of supported levels. Index zero is a special case "no fixes" level. @type array

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