include/HTMLPurifier/standalone/HTMLPurifier/Printer/HTMLDefinition.php
\HTMLPurifier_Printer_HTMLDefinition
- Parent(s)
- \HTMLPurifier_Printer
Properties

$config= ''
Instance of HTMLPurifier_Config, for easy access
Inherited from: \HTMLPurifier_Printer::$$config- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$config

$generator= ''
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Inherited from: \HTMLPurifier_Printer::$$generator- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$generator
Methods

element(
\$tag $tag, \$contents $contents, \$attr $attr
=
array(), \$escape $escape
=
true
)
:
voidPrints a complete element with content inside
Inherited from: \HTMLPurifier_Printer::element()| Name | Type | Description |
|---|---|---|
| $tag | \$tag | Tag name |
| $contents | \$contents | Element contents |
| $attr | \$attr | Tag attributes |
| $escape | \$escape | Bool whether or not to escape contents |

elementEmpty(
$tag, $attr
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $tag | ||
| $attr |

escape(
\$string $string
)
:
void
| Name | Type | Description |
|---|---|---|
| $string | \$string | String to escape |

getClass(
\$obj $obj, \$prefix $sec_prefix
=
''
)
:
voidRetrieves the class of an object without prefixes, as well as metadata
Inherited from: \HTMLPurifier_Printer::getClass()| Name | Type | Description |
|---|---|---|
| $obj | \$obj | Object to determine class of |
| $sec_prefix | \$prefix | Further prefix to remove |

heavyHeader(
$text, $num
=
1
)
:
voidCreates a heavy header row
| Name | Type | Description |
|---|---|---|
| $text | ||
| $num |

listify(
\$array $array, \$polite $polite
=
false
)
:
voidTakes a list of strings and turns them into a single list
Inherited from: \HTMLPurifier_Printer::listify()| Name | Type | Description |
|---|---|---|
| $array | \$array | List of strings |
| $polite | \$polite | Bool whether or not to add an end before the last |

listifyAttr(
\$array $array
)
:
voidListifies a hash of attributes to AttrDef classes
| Name | Type | Description |
|---|---|---|
| $array | \$array | Array hash in form of array('attrname' => HTMLPurifier_AttrDef) |

listifyObjectList(
\$array $array
)
:
voidListifies a list of objects by retrieving class names and internal state
| Name | Type | Description |
|---|---|---|
| $array | \$array | List of objects |
- Todo
- Also add information about internal state

listifyTagLookup(
\$array $array
)
:
voidListifies a tag lookup table.
| Name | Type | Description |
|---|---|---|
| $array | \$array | Tag lookup array in form of array('tagname' => true) |

prepareGenerator(
$config
)
:
voidGive generator necessary configuration if possible
Inherited from: \HTMLPurifier_Printer::prepareGenerator()| Name | Type | Description |
|---|---|---|
| $config |

renderChildren(
\$def $def
)
:
voidRenders a row describing the allowed children of an element
| Name | Type | Description |
|---|---|---|
| $def | \$def | HTMLPurifier_ChildDef of pertinent element |

row(
\$name $name, \$value $value
)
:
void
| Name | Type | Description |
|---|---|---|
| $name | \$name | Key |
| $value | \$value | Value |

start(
\$tag $tag, \$attr $attr
=
array()
)
:
void
| Name | Type | Description |
|---|---|---|
| $tag | \$tag | Tag name |
| $attr | \$attr | Attribute array |

text(
$text
)
:
void| Name | Type | Description |
|---|---|---|
| $text |