include/HTMLPurifier/standalone/HTMLPurifier/Printer.php
\HTMLPurifier_Printer
Package:
- Children
- \HTMLPurifier_Printer_ConfigForm
- \HTMLPurifier_Printer_ConfigForm_NullDecorator
- \HTMLPurifier_Printer_ConfigForm_default
- \HTMLPurifier_Printer_ConfigForm_bool
- \HTMLPurifier_Printer_HTMLDefinition
- \HTMLPurifier_Printer_CSSDefinition
Properties
Methods

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

escape(
\$string $string
)
:
voidEscapes a string for HTML output.
Parameters
| 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
Parameters
| Name | Type | Description |
|---|---|---|
| $obj | \$obj | Object to determine class of |
| $sec_prefix | \$prefix | Further prefix to remove |

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

prepareGenerator(
$config
)
:
voidGive generator necessary configuration if possible
Parameters
| Name | Type | Description |
|---|---|---|
| $config |

row(
\$name $name, \$value $value
)
:
voidPrints a simple key/value row in a table.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | \$name | Key |
| $value | \$value | Value |

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