%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/pn/utils/vendor/imangazaliev/didom/src/DiDom/
Upload File :
Create Path :
Current File : //var/www/pn/utils/vendor/imangazaliev/didom/src/DiDom/Errors.php

<?php

namespace DiDom;

class Errors
{
    /**
     * @var bool
     */
    protected static $internalErrors;

    /**
     * @var bool
     */
    protected static $disableEntities;

    /**
     * Disable error reporting.
     */
    public static function disable()
    {
        self::$internalErrors = libxml_use_internal_errors(true);

        if (\LIBXML_VERSION < 20900) {
            self::$disableEntities = libxml_disable_entity_loader(true);
        }
    }

    /**
     * Restore error reporting.
     * 
     * @param bool $clear
     */
    public static function restore($clear = true)
    {
        if ($clear) {
            libxml_clear_errors();
        }

        libxml_use_internal_errors(self::$internalErrors);

        if (\LIBXML_VERSION < 20900) {
            libxml_disable_entity_loader(self::$disableEntities);
        }
    }
}

Zerion Mini Shell 1.0