Cheetah
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HTMLPurifier_Printer Class Reference
Inheritance diagram for HTMLPurifier_Printer:
HTMLPurifier_Printer_ConfigForm HTMLPurifier_Printer_ConfigForm_bool HTMLPurifier_Printer_ConfigForm_default HTMLPurifier_Printer_ConfigForm_NullDecorator HTMLPurifier_Printer_CSSDefinition HTMLPurifier_Printer_HTMLDefinition

Public Member Functions

 __construct ()
 
 prepareGenerator ($config)
 

Protected Member Functions

 start ($tag, $attr=array())
 
 end ($tag)
 
 element ($tag, $contents, $attr=array(), $escape=true)
 
 elementEmpty ($tag, $attr=array())
 
 text ($text)
 
 row ($name, $value)
 
 escape ($string)
 
 listify ($array, $polite=false)
 
 getClass ($obj, $sec_prefix='')
 

Protected Attributes

 $generator
 
 $config
 

Detailed Description

Definition at line 6 of file Printer.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_Printer::__construct ( )

Initialize $generator.

Definition at line 24 of file Printer.php.

Member Function Documentation

◆ element()

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

Prints a complete element with content inside

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

Definition at line 78 of file Printer.php.

◆ elementEmpty()

HTMLPurifier_Printer::elementEmpty (   $tag,
  $attr = array() 
)
protected
Parameters
string$tag
array$attr
Returns
string

Definition at line 90 of file Printer.php.

◆ end()

HTMLPurifier_Printer::end (   $tag)
protected

Returns an end tag

Parameters
string$tagTag name
Returns
string

Definition at line 63 of file Printer.php.

◆ escape()

HTMLPurifier_Printer::escape (   $string)
protected

Escapes a string for HTML output.

Parameters
string$stringString to escape
Returns
string

Definition at line 131 of file Printer.php.

◆ getClass()

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

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
Returns
string

Definition at line 170 of file Printer.php.

◆ listify()

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

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
Returns
string

Definition at line 144 of file Printer.php.

◆ prepareGenerator()

HTMLPurifier_Printer::prepareGenerator (   $config)

Give generator necessary configuration if possible

Parameters
HTMLPurifier_Config$config

Definition at line 32 of file Printer.php.

◆ row()

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

Prints a simple key/value row in a table.

Parameters
string$nameKey
mixed$valueValue
Returns
string

Definition at line 114 of file Printer.php.

◆ start()

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

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
Returns
string

Definition at line 51 of file Printer.php.

◆ text()

HTMLPurifier_Printer::text (   $text)
protected
Parameters
string$text
Returns
string

Definition at line 101 of file Printer.php.

Member Data Documentation

◆ $config

HTMLPurifier_Printer::$config
protected

For easy access. @type HTMLPurifier_Config

Definition at line 19 of file Printer.php.

◆ $generator

HTMLPurifier_Printer::$generator
protected

For HTML generation convenience funcs. @type HTMLPurifier_Generator

Definition at line 13 of file Printer.php.


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