ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ErrorStruct.php
Go to the documentation of this file.
1<?php
2
10{
11
16 const TOKEN = 0;
17 const ATTR = 1;
18 const CSSPROP = 2;
19
24 public $type;
25
34 public $value;
35
40 public $errors = array();
41
48 public $children = array();
49
55 public function getChild($type, $id)
56 {
57 if (!isset($this->children[$type][$id])) {
58 $this->children[$type][$id] = new HTMLPurifier_ErrorStruct();
59 $this->children[$type][$id]->type = $type;
60 }
61 return $this->children[$type][$id];
62 }
63
68 public function addError($severity, $message)
69 {
70 $this->errors[] = array($severity, $message);
71 }
72}
73
74// vim: et sw=4 sts=4
Records errors for particular segments of an HTML document such as tokens, attributes or CSS properti...
Definition: ErrorStruct.php:10
$value
Value of the struct we are recording errors for.
Definition: ErrorStruct.php:34
addError($severity, $message)
Definition: ErrorStruct.php:68
$errors
Errors registered for this structure.
Definition: ErrorStruct.php:40
const TOKEN
Possible values for $children first-key.
Definition: ErrorStruct.php:16
$children
Child ErrorStructs that are from this structure.
Definition: ErrorStruct.php:48
$type
Type of this struct.
Definition: ErrorStruct.php:24