HTMLPurifier 4.4.0
|
00001 <?php 00002 00007 class HTMLPurifierExtras 00008 { 00009 00010 public static function autoload($class) { 00011 $path = HTMLPurifierExtras::getPath($class); 00012 if (!$path) return false; 00013 require $path; 00014 return true; 00015 } 00016 00017 public static function getPath($class) { 00018 if ( 00019 strncmp('FSTools', $class, 7) !== 0 && 00020 strncmp('ConfigDoc', $class, 9) !== 0 00021 ) return false; 00022 // Custom implementations can go here 00023 // Standard implementation: 00024 return str_replace('_', '/', $class) . '.php'; 00025 } 00026 00027 } 00028 00029 // vim: et sw=4 sts=4