ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
23  public $type;
24 
32  public $value;
33 
37  public $errors = array();
38 
44  public $children = array();
45 
46  public function getChild($type, $id) {
47  if (!isset($this->children[$type][$id])) {
48  $this->children[$type][$id] = new HTMLPurifier_ErrorStruct();
49  $this->children[$type][$id]->type = $type;
50  }
51  return $this->children[$type][$id];
52  }
53 
54  public function addError($severity, $message) {
55  $this->errors[] = array($severity, $message);
56  }
57 
58 }
59 
60 // vim: et sw=4 sts=4
$value
Value of the struct we are recording errors for.
Definition: ErrorStruct.php:32
Records errors for particular segments of an HTML document such as tokens, attributes or CSS properti...
Definition: ErrorStruct.php:9
$errors
Errors registered for this structure.
Definition: ErrorStruct.php:37
const TOKEN
Possible values for $children first-key.
Definition: ErrorStruct.php:16
$type
Type of this struct.
Definition: ErrorStruct.php:23
$children
Child ErrorStructs that are from this structure.
Definition: ErrorStruct.php:44
addError($severity, $message)
Definition: ErrorStruct.php:54