HumHub Documentation (unofficial)

HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer
in package

Table of Contents

Properties

$config  : mixed
For easy access.
$def  : mixed
$generator  : mixed
For HTML generation convenience funcs.

Methods

__construct()  : mixed
Initialize $generator.
prepareGenerator()  : mixed
Give generator necessary configuration if possible
render()  : string
element()  : string
Prints a complete element with content inside
elementEmpty()  : string
end()  : string
Returns an end tag
escape()  : string
Escapes a string for HTML output.
getClass()  : string
Retrieves the class of an object without prefixes, as well as metadata
heavyHeader()  : string
Creates a heavy header row
listify()  : string
Takes a list of strings and turns them into a single list
listifyAttr()  : string
Listifies a hash of attributes to AttrDef classes
listifyObjectList()  : string
Listifies a list of objects by retrieving class names and internal state
listifyTagLookup()  : string
Listifies a tag lookup table.
renderChildren()  : string
Renders a row describing the allowed children of an element
renderContentSets()  : string
Renders the Content Sets table
renderDoctype()  : string
Renders the Doctype table
renderEnvironment()  : string
Renders environment table, which is miscellaneous info
renderInfo()  : string
Renders the Elements ($info) table
row()  : string
Prints a simple key/value row in a table.
start()  : string
Returns a start tag
text()  : string

Properties

$config

For easy access.

protected mixed $config
Tags
type

HTMLPurifier_Config

$def

protected mixed $def
Tags
type

HTMLPurifier_HTMLDefinition, for easy access

$generator

For HTML generation convenience funcs.

protected mixed $generator
Tags
type

HTMLPurifier_Generator

Methods

__construct()

Initialize $generator.

public __construct() : mixed

element()

Prints a complete element with content inside

protected element(string $tag, string $contents[, array<string|int, mixed> $attr = array() ][, bool $escape = true ]) : string
Parameters
$tag : string

Tag name

$contents : string

Element contents

$attr : array<string|int, mixed> = array()

Tag attributes

$escape : bool = true

whether or not to escape contents

Return values
string

elementEmpty()

protected elementEmpty(string $tag[, array<string|int, mixed> $attr = array() ]) : string
Parameters
$tag : string
$attr : array<string|int, mixed> = array()
Return values
string

end()

Returns an end tag

protected end(string $tag) : string
Parameters
$tag : string

Tag name

Return values
string

escape()

Escapes a string for HTML output.

protected escape(string $string) : string
Parameters
$string : string

String to escape

Return values
string

getClass()

Retrieves the class of an object without prefixes, as well as metadata

protected getClass(object $obj[, string $sec_prefix = '' ]) : string
Parameters
$obj : object

Object to determine class of

$sec_prefix : string = ''

Further prefix to remove

Return values
string

heavyHeader()

Creates a heavy header row

protected heavyHeader(string $text[, int $num = 1 ]) : string
Parameters
$text : string
$num : int = 1
Return values
string

listify()

Takes a list of strings and turns them into a single list

protected listify(array<string|int, string> $array[, bool $polite = false ]) : string
Parameters
$array : array<string|int, string>

List of strings

$polite : bool = false

Bool whether or not to add an end before the last

Return values
string

listifyAttr()

Listifies a hash of attributes to AttrDef classes

protected listifyAttr(array<string|int, mixed> $array) : string
Parameters
$array : array<string|int, mixed>

Array hash in form of array('attrname' => HTMLPurifier_AttrDef)

Return values
string

listifyObjectList()

Listifies a list of objects by retrieving class names and internal state

protected listifyObjectList(array<string|int, mixed> $array) : string
Parameters
$array : array<string|int, mixed>

List of objects

Tags
todo

Also add information about internal state

Return values
string

listifyTagLookup()

Listifies a tag lookup table.

protected listifyTagLookup(array<string|int, mixed> $array) : string
Parameters
$array : array<string|int, mixed>

Tag lookup array in form of array('tagname' => true)

Return values
string

renderContentSets()

Renders the Content Sets table

protected renderContentSets() : string
Return values
string

renderDoctype()

Renders the Doctype table

protected renderDoctype() : string
Return values
string

renderEnvironment()

Renders environment table, which is miscellaneous info

protected renderEnvironment() : string
Return values
string

renderInfo()

Renders the Elements ($info) table

protected renderInfo() : string
Return values
string

row()

Prints a simple key/value row in a table.

protected row(string $name, mixed $value) : string
Parameters
$name : string

Key

$value : mixed

Value

Return values
string

start()

Returns a start tag

protected start(string $tag[, array<string|int, mixed> $attr = array() ]) : string
Parameters
$tag : string

Tag name

$attr : array<string|int, mixed> = array()

Attribute array

Return values
string

text()

protected text(string $text) : string
Parameters
$text : string
Return values
string

        
On this page

Search results