extends |
HTMLPurifier_HTMLModule |
---|
Abstract class for a set of proprietary modules that clean up (tidy) poorly written HTML.
Methods | ||||
---|---|---|---|---|
public
|
setup(HTMLPurifier_Config $config)
Lazy load constructs the module by determining the necessary
fixes to create and then delegating to the populate()…
Lazy load constructs the module by determining the necessary fixes to create and then delegating to the populate() function. Overrides |
# | ||
public
|
getFixesForLevel(string $level): array
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. Parameters
ReturnsLookup up table of fixes |
# | ||
public
|
makeFixesForLevel(array $fixes)
Dynamically populates the $fixesForLevel member variable using
the fixes array. It may be custom overloaded, used in…
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. |
# | ||
public
|
populate(array $fixes)
Populates the module with transforms and other special-case code
based on a list of fixes passed to it
Populates the module with transforms and other special-case code based on a list of fixes passed to it Parameters
|
# | ||
public
|
getFixType($name)
Parses a fix name and determines what kind of fix it is, as well
as other information defined by the fix
Parses a fix name and determines what kind of fix it is, as well as other information defined by the fix |
# | ||
public
|
makeFixes(): array
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. Overriden by |
# |
Methods inherited from HTMLPurifier_HTMLModule |
---|
getChildDef(), addElement(), addBlankElement(), addElementToContentSet(), parseContents(), mergeInAttrIncludes(), makeLookup(), |
Properties | |||
---|---|---|---|
public
|
|
$levels = [0 => 'none', 'light', 'medium', 'heavy']
List of supported levels.
Index zero is a special case "no fixes" level.
List of supported levels. Index zero is a special case "no fixes" level. |
# |
public
|
|
$defaultLevel = null
Default level to place all fixes in.
Disabled by default.
Default level to place all fixes in. Disabled by default. |
# |
public
|
|
$fixesForLevel = ['light' => [], 'medium' => [], 'heavy' => []]
Lists of fixes used by getFixesForLevel().
Format is:
HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix…
Lists of fixes used by getFixesForLevel(). Format is: HTMLModule_Tidy->fixesForLevel[$level] = array('fix-1', 'fix-2'); |
# |
Properties inherited from HTMLPurifier_HTMLModule |
---|
$name, $elements, $info, $content_sets, $attr_collections, $info_tag_transform, $info_attr_transform_pre, $info_attr_transform_post, $info_injector, $defines_child_def, $safe |