HTMLPurifier_ErrorStruct
in package
Records errors for particular segments of an HTML document such as tokens, attributes or CSS properties. They can contain error structs (which apply to components of what they represent), but their main purpose is to hold errors applying to whatever struct is being used.
Table of Contents
Constants
- ATTR = 1
- CSSPROP = 2
- TOKEN = 0
- Possible values for $children first-key. Note that top-level structures are automatically token-level.
Properties
- $children : mixed
- Child ErrorStructs that are from this structure. For example, a TOKEN ErrorStruct would contain ATTR ErrorStructs. This is a multi-dimensional array in structure: [TYPE]['identifier']
- $errors : mixed
- Errors registered for this structure.
- $type : mixed
- Type of this struct.
- $value : mixed
- Value of the struct we are recording errors for. There are various values for this: - TOKEN: Instance of HTMLPurifier_Token - ATTR: array('attr-name', 'value') - CSSPROP: array('prop-name', 'value')
Methods
- addError() : mixed
- getChild() : mixed
Constants
ATTR
public
mixed
ATTR
= 1
CSSPROP
public
mixed
CSSPROP
= 2
TOKEN
Possible values for $children first-key. Note that top-level structures are automatically token-level.
public
mixed
TOKEN
= 0
Properties
$children
Child ErrorStructs that are from this structure. For example, a TOKEN ErrorStruct would contain ATTR ErrorStructs. This is a multi-dimensional array in structure: [TYPE]['identifier']
public
mixed
$children
= array()
Tags
$errors
Errors registered for this structure.
public
mixed
$errors
= array()
Tags
$type
Type of this struct.
public
mixed
$type
Tags
$value
Value of the struct we are recording errors for. There are various values for this: - TOKEN: Instance of HTMLPurifier_Token - ATTR: array('attr-name', 'value') - CSSPROP: array('prop-name', 'value')
public
mixed
$value
Tags
Methods
addError()
public
addError(int $severity, string $message) : mixed
Parameters
- $severity : int
- $message : string
getChild()
public
getChild(string $type, string $id) : mixed
Parameters
- $type : string
- $id : string