Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
HTMLPurifier_Printer_HTMLDefinition Class Reference
Inheritance diagram for HTMLPurifier_Printer_HTMLDefinition:
HTMLPurifier_Printer

Public Member Functions

 prepareGenerator ($config)
 Give generator necessary configuration if possible.
 
 render ($config)
 

Protected Member Functions

 element ($tag, $contents, $attr=array(), $escape=true)
 Prints a complete element with content inside.
 
 elementEmpty ($tag, $attr=array())
 
 end ($tag)
 Returns an end tag.
 
 escape ($string)
 Escapes a string for HTML output.
 
 getClass ($obj, $sec_prefix='')
 Retrieves the class of an object without prefixes, as well as metadata.
 
 heavyHeader ($text, $num=1)
 Creates a heavy header row.
 
 listify ($array, $polite=false)
 Takes a list of strings and turns them into a single list.
 
 listifyAttr ($array)
 Listifies a hash of attributes to AttrDef classes.
 
 listifyObjectList ($array)
 Listifies a list of objects by retrieving class names and internal state.
 
 listifyTagLookup ($array)
 Listifies a tag lookup table.
 
 renderChildren ($def)
 Renders a row describing the allowed children of an element.
 
 renderContentSets ()
 Renders the Content Sets table.
 
 renderDoctype ()
 Renders the Doctype table.
 
 renderEnvironment ()
 Renders environment table, which is miscellaneous info.
 
 renderInfo ()
 Renders the Elements ($info) table.
 
 row ($name, $value)
 Prints a simple key/value row in a table.
 
 start ($tag, $attr=array())
 Main function that renders object or aspect of that object.
 
 text ($text)
 

Protected Attributes

 $config
 For easy access.
 
 $def
 
 $generator
 

Member Function Documentation

◆ element()

HTMLPurifier_Printer::element ( $tag,
$contents,
$attr = array(),
$escape = true )
protectedinherited

Prints a complete element with content inside.

Parameters
string$tagTag name
string$contentsElement contents
array$attrTag attributes
bool$escapewhether or not to escape contents
Return values
string

◆ elementEmpty()

HTMLPurifier_Printer::elementEmpty ( $tag,
$attr = array() )
protectedinherited
Parameters
string$tag
array$attr
Return values
string

◆ end()

HTMLPurifier_Printer::end ( $tag)
protectedinherited

Returns an end tag.

Parameters
string$tagTag name
Return values
string

◆ escape()

HTMLPurifier_Printer::escape ( $string)
protectedinherited

Escapes a string for HTML output.

Parameters
string$stringString to escape
Return values
string

◆ getClass()

HTMLPurifier_Printer::getClass ( $obj,
$sec_prefix = '' )
protectedinherited

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

Parameters
object$objObject to determine class of
string$sec_prefixFurther prefix to remove
Return values
string

◆ heavyHeader()

HTMLPurifier_Printer_HTMLDefinition::heavyHeader ( $text,
$num = 1 )
protected

Creates a heavy header row.

Parameters
string$text
int$num
Return values
string

◆ listify()

HTMLPurifier_Printer::listify ( $array,
$polite = false )
protectedinherited

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

Parameters
string[]$arrayList of strings
bool$politeBool whether or not to add an end before the last
Return values
string

◆ listifyAttr()

HTMLPurifier_Printer_HTMLDefinition::listifyAttr ( $array)
protected

Listifies a hash of attributes to AttrDef classes.

Parameters
array$arrayArray hash in form of array('attrname' => HTMLPurifier_AttrDef)
Return values
string

◆ listifyObjectList()

HTMLPurifier_Printer_HTMLDefinition::listifyObjectList ( $array)
protected

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

Parameters
array$arrayList of objects
Return values
string
Todo
Also add information about internal state

◆ listifyTagLookup()

HTMLPurifier_Printer_HTMLDefinition::listifyTagLookup ( $array)
protected

Listifies a tag lookup table.

Parameters
array$arrayTag lookup array in form of array('tagname' => true)
Return values
string

◆ prepareGenerator()

HTMLPurifier_Printer::prepareGenerator ( $config)
inherited

Give generator necessary configuration if possible.

Parameters
HTMLPurifier_Config$config

◆ render()

HTMLPurifier_Printer_HTMLDefinition::render ( $config)
Parameters
HTMLPurifier_Config$config
Return values
string

◆ renderChildren()

HTMLPurifier_Printer_HTMLDefinition::renderChildren ( $def)
protected

Renders a row describing the allowed children of an element.

Parameters
HTMLPurifier_ChildDef$defHTMLPurifier_ChildDef of pertinent element
Return values
string

◆ renderContentSets()

HTMLPurifier_Printer_HTMLDefinition::renderContentSets ( )
protected

Renders the Content Sets table.

Return values
string

◆ renderDoctype()

HTMLPurifier_Printer_HTMLDefinition::renderDoctype ( )
protected

Renders the Doctype table.

Return values
string

◆ renderEnvironment()

HTMLPurifier_Printer_HTMLDefinition::renderEnvironment ( )
protected

Renders environment table, which is miscellaneous info.

Return values
string

◆ renderInfo()

HTMLPurifier_Printer_HTMLDefinition::renderInfo ( )
protected

Renders the Elements ($info) table.

Return values
string

◆ row()

HTMLPurifier_Printer::row ( $name,
$value )
protectedinherited

Prints a simple key/value row in a table.

Parameters
string$nameKey
mixed$valueValue
Return values
string

◆ start()

HTMLPurifier_Printer::start ( $tag,
$attr = array() )
protectedinherited

Main function that renders object or aspect of that object.

Note
Parameters vary depending on printer Returns a start tag
Parameters
string$tagTag name
array$attrAttribute array
Return values
string

◆ text()

HTMLPurifier_Printer::text ( $text)
protectedinherited
Parameters
string$text
Return values
string

Member Data Documentation

◆ $config

HTMLPurifier_Printer::$config
protectedinherited

For easy access.

@type HTMLPurifier_Config


The documentation for this class was generated from the following file: