HTMLPurifier 4.4.0
|
Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML. More...
Public Member Functions | |
setup ($config) | |
Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function. | |
getFixesForLevel ($level) | |
Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it. | |
makeFixesForLevel ($fixes) | |
Dynamically populates the $fixesForLevel member variable using the fixes array. | |
populate ($fixes) | |
Populates the module with transforms and other special-case code based on a list of fixes passed to it. | |
getFixType ($name) | |
Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix. | |
makeFixes () | |
Defines all fixes the module will perform in a compact associative array of fix name to fix implementation. | |
setup ($config) | |
Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function. | |
getFixesForLevel ($level) | |
Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it. | |
makeFixesForLevel ($fixes) | |
Dynamically populates the $fixesForLevel member variable using the fixes array. | |
populate ($fixes) | |
Populates the module with transforms and other special-case code based on a list of fixes passed to it. | |
getFixType ($name) | |
Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix. | |
makeFixes () | |
Defines all fixes the module will perform in a compact associative array of fix name to fix implementation. | |
Public Attributes | |
$levels = array(0 => 'none', 'light', 'medium', 'heavy') | |
List of supported levels. | |
$defaultLevel = null | |
Default level to place all fixes in. | |
$fixesForLevel | |
Lists of fixes used by getFixesForLevel(). |
Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
HTMLPurifier_HTMLModule_Tidy::getFixesForLevel | ( | $ | level | ) |
HTMLPurifier_HTMLModule_Tidy::getFixesForLevel | ( | $ | level | ) |
Retrieves all fixes per a level, returning fixes for that specific level as well as all levels below it.
$level | String level identifier, see $levels for valid values |
Definition at line 13597 of file HTMLPurifier.standalone.php.
HTMLPurifier_HTMLModule_Tidy::getFixType | ( | $ | name | ) |
Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix.
$name | String name of fix |
Definition at line 172 of file Tidy.php.
References HTMLPurifier_HTMLModule::$name.
Referenced by populate().
HTMLPurifier_HTMLModule_Tidy::getFixType | ( | $ | name | ) |
Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix.
$name | String name of fix |
Definition at line 13696 of file HTMLPurifier.standalone.php.
References HTMLPurifier_HTMLModule::$name.
HTMLPurifier_HTMLModule_Tidy::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, HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4, HTMLPurifier_HTMLModule_Tidy_Name, HTMLPurifier_HTMLModule_Tidy_Proprietary, HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4, HTMLPurifier_HTMLModule_Tidy_Strict, and HTMLPurifier_HTMLModule_Tidy_XHTML.
Definition at line 203 of file Tidy.php.
Referenced by setup().
HTMLPurifier_HTMLModule_Tidy::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, HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4, HTMLPurifier_HTMLModule_Tidy_Name, HTMLPurifier_HTMLModule_Tidy_Proprietary, HTMLPurifier_HTMLModule_Tidy_XHTMLAndHTML4, HTMLPurifier_HTMLModule_Tidy_Strict, and HTMLPurifier_HTMLModule_Tidy_XHTML.
Definition at line 13727 of file HTMLPurifier.standalone.php.
HTMLPurifier_HTMLModule_Tidy::makeFixesForLevel | ( | $ | fixes | ) |
HTMLPurifier_HTMLModule_Tidy::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.
Definition at line 13627 of file HTMLPurifier.standalone.php.
HTMLPurifier_HTMLModule_Tidy::populate | ( | $ | fixes | ) |
Populates the module with transforms and other special-case code based on a list of fixes passed to it.
$lookup | Lookup table of fixes to activate |
Definition at line 120 of file Tidy.php.
References HTMLPurifier_HTMLModule::$name, HTMLPurifier_HTMLModule::addBlankElement(), and getFixType().
Referenced by setup().
HTMLPurifier_HTMLModule_Tidy::populate | ( | $ | fixes | ) |
Populates the module with transforms and other special-case code based on a list of fixes passed to it.
$lookup | Lookup table of fixes to activate |
Definition at line 13644 of file HTMLPurifier.standalone.php.
References HTMLPurifier_HTMLModule::$name, HTMLPurifier_HTMLModule::addBlankElement(), and getFixType().
HTMLPurifier_HTMLModule_Tidy::setup | ( | $ | config | ) |
Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function.
Reimplemented from HTMLPurifier_HTMLModule.
Definition at line 13562 of file HTMLPurifier.standalone.php.
References $config, HTMLPurifier_HTMLModule::$name, getFixesForLevel(), makeFixes(), makeFixesForLevel(), and populate().
HTMLPurifier_HTMLModule_Tidy::setup | ( | $ | config | ) |
Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function.
Reimplemented from HTMLPurifier_HTMLModule.
Definition at line 38 of file Tidy.php.
References $config, HTMLPurifier_HTMLModule::$name, getFixesForLevel(), makeFixes(), makeFixesForLevel(), and populate().
HTMLPurifier_HTMLModule_Tidy::$defaultLevel = null |
Default level to place all fixes in.
Disabled by default
Reimplemented in HTMLPurifier_HTMLModule_Tidy_Name, HTMLPurifier_HTMLModule_Tidy_Proprietary, HTMLPurifier_HTMLModule_Tidy_Strict, HTMLPurifier_HTMLModule_Tidy_Transitional, and HTMLPurifier_HTMLModule_Tidy_XHTML.
HTMLPurifier_HTMLModule_Tidy::$fixesForLevel |
array( 'light' => array(), 'medium' => array(), 'heavy' => array() )
Lists of fixes used by getFixesForLevel().
Format is: HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2');
HTMLPurifier_HTMLModule_Tidy::$levels = array(0 => 'none', 'light', 'medium', 'heavy') |