Class HTMLPurifier_HTMLModule_Tidy

Description

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

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

  • todo: Figure out how to protect some of these methods/properties

Located in /library/HTMLPurifier/HTMLModule/Tidy.php (line 8)

HTMLPurifier_HTMLModule
   |
   --HTMLPurifier_HTMLModule_Tidy
Direct descendents
Class Description
HTMLPurifier_HTMLModule_Tidy_Proprietary Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_Tidy_XHTML Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4 Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
Variable Summary
Method Summary
Lookup getFixesForLevel ($level $level)
array(string getFixType ($name $name)
void makeFixes ()
void makeFixesForLevel ( $fixes)
void populate ($lookup $fixes)
void setup ( $config)
Variables
mixed $defaultLevel = null (line 20)

Default level to place all fixes in.

Default level to place all fixes in. Disabled by default

  • access: public

Redefined in descendants as:
mixed $fixesForLevel = array(
'light' => array(),'medium'=>array(),'heavy'=>array())
(line 26)

Lists of fixes used by getFixesForLevel().

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

  • access: public
mixed $levels = array(0 => 'none', 'light', 'medium', 'heavy') (line 15)

List of supported levels. level.

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

  • access: public

Inherited Variables

Inherited from HTMLPurifier_HTMLModule

HTMLPurifier_HTMLModule::$attr_collections
HTMLPurifier_HTMLModule::$content_sets
HTMLPurifier_HTMLModule::$defines_child_def
HTMLPurifier_HTMLModule::$elements
HTMLPurifier_HTMLModule::$info
HTMLPurifier_HTMLModule::$info_attr_transform_post
HTMLPurifier_HTMLModule::$info_attr_transform_pre
HTMLPurifier_HTMLModule::$info_injector
HTMLPurifier_HTMLModule::$info_tag_transform
HTMLPurifier_HTMLModule::$name
HTMLPurifier_HTMLModule::$safe
Methods
getFixesForLevel (line 73)

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

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

  • return: up table of fixes
  • access: public
Lookup getFixesForLevel ($level $level)
  • $level $level: String level identifier, see $levels for valid values
getFixType (line 172)

Parses a fix name and determines what kind of fix it is, as well

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

  • return: array $fix_parameters)
  • access: public
array(string getFixType ($name $name)
  • $name $name: String name of fix
makeFixes (line 203)

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

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

  • access: public
void makeFixes ()

Redefined in descendants as:
makeFixesForLevel (line 103)

Dynamically populates the $fixesForLevel member variable using the fixes array. with $defaultLevel, or not used at all.

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.

  • access: public
void makeFixesForLevel ( $fixes)
  • $fixes
populate (line 120)

Populates the module with transforms and other special-case code

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

  • access: public
void populate ($lookup $fixes)
  • $lookup $fixes: Lookup table of fixes to activate
setup (line 38)

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

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

  • todo: Wildcard matching and error reporting when an added or subtracted fix has no effect.
  • access: public
void setup ( $config)
  • $config

Redefinition of:
HTMLPurifier_HTMLModule::setup()
Lazy load construction of the module after determining whether or not it's needed, and also when a finalized configuration object is available.

Inherited Methods

Inherited From HTMLPurifier_HTMLModule

HTMLPurifier_HTMLModule::addBlankElement()
HTMLPurifier_HTMLModule::addElement()
HTMLPurifier_HTMLModule::addElementToContentSet()
HTMLPurifier_HTMLModule::getChildDef()
HTMLPurifier_HTMLModule::makeLookup()
HTMLPurifier_HTMLModule::mergeInAttrIncludes()
HTMLPurifier_HTMLModule::parseContents()
HTMLPurifier_HTMLModule::setup()

Documentation generated on Thu, 19 Jun 2008 18:50:25 -0400 by phpDocumentor 1.4.2