Class HTMLPurifier_ErrorStruct


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.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$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'] HTMLPurifier_ErrorStruct
$errors Errors registered for this structure. HTMLPurifier_ErrorStruct
$type Type of this struct. HTMLPurifier_ErrorStruct
$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') HTMLPurifier_ErrorStruct


Hide inherited constants

ConstantValueDescriptionDefined By
ATTR 1 HTMLPurifier_ErrorStruct
CSSPROP 2 HTMLPurifier_ErrorStruct
TOKEN 0 Possible values for $children first-key. Note that top-level structures are automatically token-level. HTMLPurifier_ErrorStruct

Property Details

$children public property
public $children = []
$errors public property
public $errors = []
$type public property
public $type null
$value public property
public $value null

Method Details

addError() public method

public void addError ( $severity, $message )
$severity int
$message string
getChild() public method

public mixed getChild ( $type, $id )
$type string
$id string