Add vim modelines to all files.
[htmlpurifier/bfroehle.git] / extras / HTMLPurifierExtras.php
blob2a0c4d12d9d55ed67126b1a97325a8998930471a
1 <?php
3 /**
4 * Meta-class for HTML Purifier's extra class hierarchies, similar to
5 * HTMLPurifier_Bootstrap.
6 */
7 class HTMLPurifierExtras
10 public static function autoload($class) {
11 $path = HTMLPurifierExtras::getPath($class);
12 if (!$path) return false;
13 require $path;
14 return true;
17 public static function getPath($class) {
18 if (
19 strncmp('FSTools', $class, 7) !== 0 &&
20 strncmp('ConfigDoc', $class, 9) !== 0
21 ) return false;
22 // Custom implementations can go here
23 // Standard implementation:
24 return str_replace('_', '/', $class) . '.php';
29 // vim: et sw=4 sts=4