ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
generate-schema-cache.php
Go to the documentation of this file.
1 #!/usr/bin/php
2 <?php
3 
4 require_once dirname(__FILE__) . '/common.php';
5 require_once dirname(__FILE__) . '/../library/HTMLPurifier.auto.php';
6 assertCli();
7 
22 $target = dirname(__FILE__) . '/../library/HTMLPurifier/ConfigSchema/schema.ser';
23 
26 
27 $builder->buildDir($interchange);
28 
29 $loader = dirname(__FILE__) . '/../config-schema.php';
30 if (file_exists($loader)) include $loader;
31 foreach ($_SERVER['argv'] as $i => $dir) {
32  if ($i === 0) continue;
33  $builder->buildDir($interchange, realpath($dir));
34 }
35 
36 $interchange->validate();
37 
40 
41 echo "Saving schema... ";
42 file_put_contents($target, serialize($schema));
43 echo "done!\n";
44 
45 // vim: et sw=4 sts=4
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
Converts HTMLPurifier_ConfigSchema_Interchange to our runtime representation used to perform checks o...
Definition: ConfigSchema.php:7
Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_Con...
Definition: Interchange.php:8
assertCli()
Definition: common.php:3
$i
Definition: disco.tpl.php:19