HTMLPurifier 4.4.0
HTMLPurifier_ErrorStruct Class Reference

Records errors for particular segments of an HTML document such as tokens, attributes or CSS properties. More...

List of all members.

Public Member Functions

 getChild ($type, $id)
 addError ($severity, $message)
 getChild ($type, $id)
 addError ($severity, $message)

Public Attributes

const TOKEN = 0
 Possible values for $children first-key.
const ATTR = 1
const CSSPROP = 2
 $type
 Type of this struct.
 $value
 Value of the struct we are recording errors for.
 $errors = array()
 Errors registered for this structure.
 $children = array()
 Child ErrorStructs that are from this structure.

Detailed Description

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.

Definition at line 9 of file ErrorStruct.php.


Member Function Documentation

HTMLPurifier_ErrorStruct::addError ( severity,
message 
)

Definition at line 54 of file ErrorStruct.php.

HTMLPurifier_ErrorStruct::addError ( severity,
message 
)

Definition at line 4011 of file HTMLPurifier.standalone.php.

HTMLPurifier_ErrorStruct::getChild ( type,
id 
)

Definition at line 4003 of file HTMLPurifier.standalone.php.

References $type.

HTMLPurifier_ErrorStruct::getChild ( type,
id 
)

Definition at line 46 of file ErrorStruct.php.

References $type.


Member Data Documentation

HTMLPurifier_ErrorStruct::$children = array()

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']

Definition at line 44 of file ErrorStruct.php.

HTMLPurifier_ErrorStruct::$errors = array()

Errors registered for this structure.

Definition at line 37 of file ErrorStruct.php.

HTMLPurifier_ErrorStruct::$type

Type of this struct.

Definition at line 23 of file ErrorStruct.php.

Referenced by getChild().

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')

Definition at line 32 of file ErrorStruct.php.

Definition at line 17 of file ErrorStruct.php.

Referenced by HTMLPurifier_ErrorCollector::send().

Definition at line 18 of file ErrorStruct.php.

Referenced by HTMLPurifier_ErrorCollector::send().

Possible values for $children first-key.

Note that top-level structures are automatically token-level.

Definition at line 16 of file ErrorStruct.php.

Referenced by HTMLPurifier_ErrorCollector::send().


The documentation for this class was generated from the following files: