PATH:
home
/
thebhoeo
/
.trash
/
wpforms-lite-pro
/
vendor_prefixed
/
ezyang
/
htmlpurifier
/
library
/
HTMLPurifier
<?php namespace WPForms\Vendor; // constants are slow, so we use as few as possible if (!\defined('WPForms\\Vendor\\HTMLPURIFIER_PREFIX')) { \define('WPForms\\Vendor\\HTMLPURIFIER_PREFIX', \realpath(\dirname(__FILE__) . '/..')); } // accommodations for versions earlier than 5.0.2 // borrowed from PHP_Compat, LGPL licensed, by Aidan Lister <aidan@php.net> if (!\defined('PHP_EOL')) { switch (\strtoupper(\substr(\PHP_OS, 0, 3))) { case 'WIN': \define('PHP_EOL', "\r\n"); break; case 'DAR': \define('PHP_EOL', "\r"); break; default: \define('PHP_EOL', "\n"); } } /** * Bootstrap class that contains meta-functionality for HTML Purifier such as * the autoload function. * * @note * This class may be used without any other files from HTML Purifier. */ class HTMLPurifier_Bootstrap { /** * Autoload function for HTML Purifier * @param string $class Class to load * @return bool */ public static function autoload($class) { $file = HTMLPurifier_Bootstrap::getPath($class); if (!$file) { return \false; } // Technically speaking, it should be ok and more efficient to // just do 'require', but Antonio Parraga reports that with // Zend extensions such as Zend debugger and APC, this invariant // may be broken. Since we have efficient alternatives, pay // the cost here and avoid the bug. require_once \WPForms\Vendor\HTMLPURIFIER_PREFIX . '/' . $file; return \true; } /** * Returns the path for a specific class. * @param string $class Class path to get * @return string */ public static function getPath($class) { if (\strncmp('WPForms\Vendor\HTMLPurifier', $class, 27) !== 0) { return \false; } // Custom implementations if (\strncmp('WPForms\Vendor\HTMLPurifier_Language_', $class, 37) !== 0) { $code = \str_replace('_', '-', \substr($class, 37)); $file = 'HTMLPurifier/Language/classes/' . $code . '.php'; } else { $file = \str_replace('_', '/', $class) . '.php'; } if (!\file_exists(\WPForms\Vendor\HTMLPURIFIER_PREFIX . '/' . $file)) { return \false; } return $file; } /** * "Pre-registers" our autoloader on the SPL stack. */ public static function registerAutoload() { $autoload = array('WPForms\Vendor\HTMLPurifier_Bootstrap', 'autoload'); if (\spl_autoload_functions() === \false) { \spl_autoload_register($autoload); } else { // prepend flag exists, no need for shenanigans \spl_autoload_register($autoload, \true, \true); } } } // vim: et sw=4 sts=4
[-] AttrTypes.php
[edit]
[-] Arborize.php
[edit]
[-] AttrCollections.php
[edit]
[-] Printer.php
[edit]
[-] VarParser.php
[edit]
[-] DoctypeRegistry.php
[edit]
[-] Language.php
[edit]
[-] HTMLModuleManager.php
[edit]
[-] AttrDef.php
[edit]
[+]
Token
[-] ErrorStruct.php
[edit]
[-] IDAccumulator.php
[edit]
[+]
ChildDef
[+]
VarParser
[-] Doctype.php
[edit]
[+]
URIScheme
[+]
Strategy
[-] DefinitionCacheFactory.php
[edit]
[+]
AttrTransform
[-] Zipper.php
[edit]
[-] Filter.php
[edit]
[-] Node.php
[edit]
[+]
URIFilter
[+]
Injector
[-] PropertyList.php
[edit]
[+]
ConfigSchema
[-] Lexer.php
[edit]
[+]
AttrDef
[-] TokenFactory.php
[edit]
[-] TagTransform.php
[edit]
[-] StringHashParser.php
[edit]
[+]
Printer
[-] ContentSets.php
[edit]
[-] Definition.php
[edit]
[-] URISchemeRegistry.php
[edit]
[+]
TagTransform
[-] ErrorCollector.php
[edit]
[-] Injector.php
[edit]
[-] Length.php
[edit]
[-] Exception.php
[edit]
[+]
DefinitionCache
[-] URIDefinition.php
[edit]
[-] Token.php
[edit]
[-] URIScheme.php
[edit]
[-] EntityParser.php
[edit]
[-] ElementDef.php
[edit]
[+]
Node
[+]
Filter
[-] URIParser.php
[edit]
[-] PropertyListIterator.php
[edit]
[+]
HTMLModule
[+]
..
[-] Bootstrap.php
[edit]
[-] PercentEncoder.php
[edit]
[-] UnitConverter.php
[edit]
[-] VarParserException.php
[edit]
[-] ChildDef.php
[edit]
[-] HTMLDefinition.php
[edit]
[-] AttrValidator.php
[edit]
[+]
Lexer
[-] URIFilter.php
[edit]
[-] Queue.php
[edit]
[-] CSSDefinition.php
[edit]
[-] AttrTransform.php
[edit]
[-] URI.php
[edit]
[-] StringHash.php
[edit]
[-] EntityLookup.php
[edit]
[+]
Language
[-] LanguageFactory.php
[edit]
[-] ConfigSchema.php
[edit]
[-] HTMLModule.php
[edit]
[-] DefinitionCache.php
[edit]
[-] Context.php
[edit]
[-] Config.php
[edit]
[+]
EntityLookup
[-] Strategy.php
[edit]
[-] Encoder.php
[edit]
[-] Generator.php
[edit]