XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
Tag.php
Go to the documentation of this file.
1 <?php
2 
7 {
14  public $is_tag = true;
15 
23  public $name;
24 
28  public $attr = array();
29 
36  public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) {
37  $this->name = ctype_lower($name) ? $name : strtolower($name);
38  foreach ($attr as $key => $value) {
39  // normalization only necessary when key is not lowercase
40  if (!ctype_lower($key)) {
41  $new_key = strtolower($key);
42  if (!isset($attr[$new_key])) {
43  $attr[$new_key] = $attr[$key];
44  }
45  if ($new_key !== $key) {
46  unset($attr[$key]);
47  }
48  }
49  }
50  $this->attr = $attr;
51  $this->line = $line;
52  $this->col = $col;
53  $this->armor = $armor;
54  }
55 }
56 
57 // vim: et sw=4 sts=4