Skip to content

HTMLPurifier_ErrorCollector

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

  • Full name: \HTMLPurifier_ErrorCollector

Constants

Constant Visibility Type Value
LINENO public 0
SEVERITY public 1
MESSAGE public 2
CHILDREN public 3

Properties

errors

protected $errors

_current

protected $_current

_stacks

protected $_stacks

locale

protected $locale

generator

protected $generator

context

protected $context

lines

protected $lines

Methods

__construct

public __construct(\HTMLPurifier_Context $context): mixed

Parameters:

Parameter Type Description
$context \HTMLPurifier_Context

send

Sends an error message to the collector for later use

public send(int $severity, string $msg): mixed

Parameters:

Parameter Type Description
$severity int Error severity, PHP error style (don't use E_USER_)
$msg string Error message text

getRaw

Retrieves raw error data for custom formatter to use

public getRaw(): mixed

getHTMLFormatted

Default HTML formatting implementation for error messages

public getHTMLFormatted(\HTMLPurifier_Config $config, array $errors = null): string

Parameters:

Parameter Type Description
$config \HTMLPurifier_Config Configuration, vital for HTML output nature
$errors array Errors array to display; used for recursion.

_renderStruct

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

Parameters:

Parameter Type Description
$ret mixed
$struct mixed
$line mixed
$col mixed


Automatically generated on 2025-03-18