34        $currentErrors = libxml_get_errors();
 
   35        libxml_clear_errors();
 
   37        $level = count(self::$errorStack) - 1;
 
   38        self::$errorStack[$level] = array_merge(self::$errorStack[$level], $currentErrors);
 
   52        if (!function_exists(
'libxml_use_internal_errors')) {
 
   56        if (count(self::$errorStack) === 0) {
 
   58            self::$xmlErrorState = libxml_use_internal_errors(
true);
 
   59            libxml_clear_errors();
 
   68        self::$errorStack[] = array();
 
   77    public static function end()
 
   81        if (!function_exists(
'libxml_use_internal_errors')) {
 
   90        $ret = array_pop(self::$errorStack);
 
   92        if (count(self::$errorStack) === 0) {
 
   94            libxml_use_internal_errors(self::$xmlErrorState);
 
  111        assert(
'$error instanceof LibXMLError');
 
  113            ',msg=' . trim(
$error->message);
 
  129        assert(
'is_array($errors)');
 
An exception for terminatinating execution or to throw for unit testing.
static addErrors()
Append current XML errors to the current stack level.
static formatErrors($errors)
Format a list of errors as a string.
static begin()
Start error logging.
static formatError($error)
Format an error as a string.
static end()
End error logging.