HTMLPurifier 4.4.0
HTMLPurifier_ErrorCollector Class Reference

Error collection class that enables HTML Purifier to report HTML problems back to the user. More...

List of all members.

Public Member Functions

 __construct ($context)
 send ($severity, $msg)
 Sends an error message to the collector for later use.
 getRaw ()
 Retrieves raw error data for custom formatter to use.
 getHTMLFormatted ($config, $errors=null)
 Default HTML formatting implementation for error messages.
 __construct ($context)
 send ($severity, $msg)
 Sends an error message to the collector for later use.
 getRaw ()
 Retrieves raw error data for custom formatter to use.
 getHTMLFormatted ($config, $errors=null)
 Default HTML formatting implementation for error messages.

Public Attributes

const LINENO = 0
 Identifiers for the returned error array.
const SEVERITY = 1
const MESSAGE = 2
const CHILDREN = 3

Protected Attributes

 $errors
 $_current
 $_stacks = array(array())
 $locale
 $generator
 $context
 $lines = array()

Private Member Functions

 _renderStruct (&$ret, $struct, $line=null, $col=null)
 _renderStruct (&$ret, $struct, $line=null, $col=null)

Detailed Description

Error collection class that enables HTML Purifier to report HTML problems back to the user.

Definition at line 7 of file ErrorCollector.php.


Constructor & Destructor Documentation

HTMLPurifier_ErrorCollector::__construct ( context)

Definition at line 28 of file ErrorCollector.php.

References $context.

HTMLPurifier_ErrorCollector::__construct ( context)

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

References $context.


Member Function Documentation

HTMLPurifier_ErrorCollector::_renderStruct ( &$  ret,
struct,
line = null,
col = null 
) [private]

Definition at line 171 of file ErrorCollector.php.

References $context.

Referenced by getHTMLFormatted().

HTMLPurifier_ErrorCollector::_renderStruct ( &$  ret,
struct,
line = null,
col = null 
) [private]

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

References $context.

HTMLPurifier_ErrorCollector::getHTMLFormatted ( config,
errors = null 
)

Default HTML formatting implementation for error messages.

Parameters:
$configConfiguration array, vital for HTML output nature
$errorsErrors array to display; used for recursion.

Definition at line 144 of file ErrorCollector.php.

References $config, $errors, and _renderStruct().

HTMLPurifier_ErrorCollector::getHTMLFormatted ( config,
errors = null 
)

Default HTML formatting implementation for error messages.

Parameters:
$configConfiguration array, vital for HTML output nature
$errorsErrors array to display; used for recursion.

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

References $config, $errors, and _renderStruct().

HTMLPurifier_ErrorCollector::getRaw ( )

Retrieves raw error data for custom formatter to use.

Parameters:
Listof arrays in format of array(line of error, error severity, error message, recursive sub-errors array)

Definition at line 135 of file ErrorCollector.php.

HTMLPurifier_ErrorCollector::getRaw ( )

Retrieves raw error data for custom formatter to use.

Parameters:
Listof arrays in format of array(line of error, error severity, error message, recursive sub-errors array)

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

HTMLPurifier_ErrorCollector::send ( severity,
msg 
)

Sends an error message to the collector for later use.

Parameters:
$severityint Error severity, PHP error style (don't use E_USER_)
$msgstring Error message text
$subst1string First substitution for $msg
$subst2string ...

Definition at line 42 of file ErrorCollector.php.

References HTMLPurifier_ErrorStruct::ATTR, HTMLPurifier_ErrorStruct::CSSPROP, and HTMLPurifier_ErrorStruct::TOKEN.

HTMLPurifier_ErrorCollector::send ( severity,
msg 
)

Sends an error message to the collector for later use.

Parameters:
$severityint Error severity, PHP error style (don't use E_USER_)
$msgstring Error message text
$subst1string First substitution for $msg
$subst2string ...

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

References HTMLPurifier_ErrorStruct::ATTR, HTMLPurifier_ErrorStruct::CSSPROP, and HTMLPurifier_ErrorStruct::TOKEN.


Member Data Documentation

HTMLPurifier_ErrorCollector::$_current [protected]

Definition at line 20 of file ErrorCollector.php.

HTMLPurifier_ErrorCollector::$_stacks = array(array()) [protected]

Definition at line 21 of file ErrorCollector.php.

HTMLPurifier_ErrorCollector::$context [protected]

Definition at line 24 of file ErrorCollector.php.

Referenced by __construct(), and _renderStruct().

HTMLPurifier_ErrorCollector::$errors [protected]

Definition at line 19 of file ErrorCollector.php.

Referenced by getHTMLFormatted().

HTMLPurifier_ErrorCollector::$generator [protected]

Definition at line 23 of file ErrorCollector.php.

HTMLPurifier_ErrorCollector::$lines = array() [protected]

Definition at line 26 of file ErrorCollector.php.

HTMLPurifier_ErrorCollector::$locale [protected]

Definition at line 22 of file ErrorCollector.php.

Definition at line 17 of file ErrorCollector.php.

Identifiers for the returned error array.

These are purposely numeric so list() can be used.

Definition at line 14 of file ErrorCollector.php.

Definition at line 16 of file ErrorCollector.php.

Definition at line 15 of file ErrorCollector.php.


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