4 chdir(dirname(__FILE__
));
5 require_once 'common.php';
6 require_once '../library/HTMLPurifier.auto.php';
11 * Generates a schema cache file, saving it to
12 * library/HTMLPurifier/ConfigSchema/schema.ser.
14 * This should be run when new configuration options are added to
15 * HTML Purifier. A cached version is available via SVN so this does not
16 * normally have to be regenerated.
19 $target = '../library/HTMLPurifier/ConfigSchema/schema.ser';
21 $interchange = HTMLPurifier_ConfigSchema_InterchangeBuilder
::buildFromDirectory();
22 $interchange->validate();
24 $schema_builder = new HTMLPurifier_ConfigSchema_Builder_ConfigSchema();
25 $schema = $schema_builder->build($interchange);
27 echo "Saving schema... ";
28 file_put_contents($target, serialize($schema));