|
- <?php
-
-
- class HTMLPurifierExtras
- {
-
- public static function autoload($class)
- {
- $path = HTMLPurifierExtras::getPath($class);
- if (!$path) return false;
- require $path;
- return true;
- }
-
- public static function getPath($class)
- {
- if (
- strncmp('FSTools', $class, 7) !== 0 &&
- strncmp('ConfigDoc', $class, 9) !== 0
- ) return false;
-
-
- return str_replace('_', '/', $class) . '.php';
- }
-
- }
-
|