ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 ()
 
- Public Member Functions inherited from HTMLPurifier_Node
 toTokenPair ()
 Returns a pair of start and end tokens, where the end token is null if it is not necessary. More...
 

Data Fields

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

Detailed Description

Concrete element node class.

Definition at line 6 of file Element.php.

Constructor & Destructor Documentation

◆ __construct()

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.

39  {
40  $this->name = $name;
41  $this->attr = $attr;
42  $this->line = $line;
43  $this->col = $col;
44  $this->armor = $armor;
45  }
$attr
Associative array of the node's attributes.
Definition: Element.php:22
$name
The lower-case name of the tag, like 'a', 'b' or 'blockquote'.
Definition: Element.php:16
$line
Line number of the start token in the source document int.
Definition: Node.php:17
$col
Column number of the start token in the source document.
Definition: Node.php:23
$armor
Lookup array of processing that this token is exempt from.
Definition: Node.php:30

Member Function Documentation

◆ toTokenPair()

HTMLPurifier_Node_Element::toTokenPair ( )

Definition at line 47 of file Element.php.

References $end, and array.

47  {
48  // XXX inefficiency here, normalization is not necessary
49  if ($this->empty) {
50  return array(new HTMLPurifier_Token_Empty($this->name, $this->attr, $this->line, $this->col, $this->armor), null);
51  } else {
52  $start = new HTMLPurifier_Token_Start($this->name, $this->attr, $this->line, $this->col, $this->armor);
53  $end = new HTMLPurifier_Token_End($this->name, array(), $this->endLine, $this->endCol, $this->endArmor);
54  //$end->start = $start;
55  return array($start, $end);
56  }
57  }
Concrete end token class.
Definition: End.php:10
Concrete start token class.
Definition: Start.php:6
$end
Definition: saml1-acs.php:18
Create styles array
The data for the language used.
Concrete empty token class.
Definition: Empty.php:6

Field Documentation

◆ $attr

HTMLPurifier_Node_Element::$attr = array()

Associative array of the node's attributes.

array

Definition at line 22 of file Element.php.

Referenced by __construct().

◆ $children

HTMLPurifier_Node_Element::$children = array()

List of child elements.

array

Definition at line 28 of file Element.php.

◆ $empty

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.

◆ $endArmor

HTMLPurifier_Node_Element::$endArmor = array()

Definition at line 37 of file Element.php.

◆ $endCol

HTMLPurifier_Node_Element::$endCol = null

Definition at line 37 of file Element.php.

◆ $endLine

HTMLPurifier_Node_Element::$endLine = null

Definition at line 37 of file Element.php.

◆ $name

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: