ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HTMLPurifier_Node_Element Class Reference

Concrete element node class. More...

+ Inheritance diagram for HTMLPurifier_Node_Element:
+ Collaboration diagram for HTMLPurifier_Node_Element:

Public Member Functions

 __construct ($name, $attr=array(), $line=null, $col=null, $armor=array())
 toTokenPair ()
 Returns a pair of start and end tokens, where the end token is null if it is not necessary.

Data Fields

 $name
 The lower-case name of the tag, like 'a', 'b' or 'blockquote'.
 $attr = array()
 Associative array of the node's attributes.
 $children = array()
 List of child elements.
 $empty = false
 Does this use the form or the form, i.e.
 $endCol = null
 $endLine = null
 $endArmor = array()
- Data Fields inherited from HTMLPurifier_Node
 $line
 Line number of the start token in the source document int.
 $col
 Column number of the start token in the source document.
 $armor = array()
 Lookup array of processing that this token is exempt from.
 $dead = false
 When true, this node should be ignored as non-existent.

Detailed Description

Concrete element node class.

Definition at line 6 of file Element.php.

Constructor & Destructor Documentation

HTMLPurifier_Node_Element::__construct (   $name,
  $attr = array(),
  $line = null,
  $col = null,
  $armor = array() 
)

Definition at line 39 of file Element.php.

References HTMLPurifier_Node\$armor, $attr, HTMLPurifier_Node\$col, HTMLPurifier_Node\$line, and $name.

{
$this->name = $name;
$this->attr = $attr;
$this->line = $line;
$this->col = $col;
$this->armor = $armor;
}

Member Function Documentation

HTMLPurifier_Node_Element::toTokenPair ( )

Returns a pair of start and end tokens, where the end token is null if it is not necessary.

Does not include children. array

Reimplemented from HTMLPurifier_Node.

Definition at line 47 of file Element.php.

{
// XXX inefficiency here, normalization is not necessary
if ($this->empty) {
return array(new HTMLPurifier_Token_Empty($this->name, $this->attr, $this->line, $this->col, $this->armor), null);
} else {
$start = new HTMLPurifier_Token_Start($this->name, $this->attr, $this->line, $this->col, $this->armor);
$end = new HTMLPurifier_Token_End($this->name, array(), $this->endLine, $this->endCol, $this->endArmor);
//$end->start = $start;
return array($start, $end);
}
}

Field Documentation

HTMLPurifier_Node_Element::$attr = array()

Associative array of the node's attributes.

array

Definition at line 22 of file Element.php.

Referenced by __construct().

HTMLPurifier_Node_Element::$children = array()

List of child elements.

array

Definition at line 28 of file Element.php.

HTMLPurifier_Node_Element::$empty = false

Does this use the form or the form, i.e.

is it a pair of start/end tokens or an empty token.

Definition at line 35 of file Element.php.

HTMLPurifier_Node_Element::$endArmor = array()

Definition at line 37 of file Element.php.

HTMLPurifier_Node_Element::$endCol = null

Definition at line 37 of file Element.php.

HTMLPurifier_Node_Element::$endLine = null

Definition at line 37 of file Element.php.

HTMLPurifier_Node_Element::$name

The lower-case name of the tag, like 'a', 'b' or 'blockquote'.

Note
Strictly speaking, XML tags are case sensitive, so we shouldn't be lower-casing them, but these tokens cater to HTML tags, which are insensitive. string

Definition at line 16 of file Element.php.

Referenced by __construct().


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