ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
Element.php
Go to the documentation of this file.
1 <?php
2 
7 {
16  public $name;
17 
22  public $attr = array();
23 
28  public $children = array();
29 
35  public $empty = false;
36 
37  public $endCol = null, $endLine = null, $endArmor = array();
38 
39  public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) {
40  $this->name = $name;
41  $this->attr = $attr;
42  $this->line = $line;
43  $this->col = $col;
44  $this->armor = $armor;
45  }
46 
47  public function toTokenPair() {
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  }
58 }
59 
Concrete end token class.
Definition: End.php:10
Concrete element node class.
Definition: Element.php:6
Concrete start token class.
Definition: Start.php:6
Abstract base node class that all others inherit from.
Definition: Node.php:11
$attr
Associative array of the node&#39;s attributes.
Definition: Element.php:22
$children
List of child elements.
Definition: Element.php:28
$name
The lower-case name of the tag, like &#39;a&#39;, &#39;b&#39; or &#39;blockquote&#39;.
Definition: Element.php:16
Create styles array
The data for the language used.
Concrete empty token class.
Definition: Empty.php:6
$line
Line number of the start token in the source document int.
Definition: Node.php:17
__construct($name, $attr=array(), $line=null, $col=null, $armor=array())
Definition: Element.php:39
$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
$empty
Does this use the form or the form, i.e.
Definition: Element.php:35