ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
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
24
$builder
=
new
HTMLPurifier_ConfigSchema_InterchangeBuilder
();
25
$interchange
=
new
HTMLPurifier_ConfigSchema_Interchange
();
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
38
$schema_builder
=
new
HTMLPurifier_ConfigSchema_Builder_ConfigSchema
();
39
$schema
=
$schema_builder
->build(
$interchange
);
40
41
echo
"Saving schema... "
;
42
file_put_contents(
$target
, serialize(
$schema
));
43
echo
"done!\n"
;
44
45
// vim: et sw=4 sts=4
$_SERVER
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
Definition:
tcpdf_autoconfig.php:54
$schema
$schema
Definition:
generate-schema-cache.php:39
$target
$target
Definition:
generate-schema-cache.php:22
HTMLPurifier_ConfigSchema_Builder_ConfigSchema
Converts HTMLPurifier_ConfigSchema_Interchange to our runtime representation used to perform checks o...
Definition:
ConfigSchema.php:7
$loader
$loader
Definition:
generate-schema-cache.php:29
HTMLPurifier_ConfigSchema_Interchange
Generic schema interchange format that can be converted to a runtime representation (HTMLPurifier_Con...
Definition:
Interchange.php:8
$builder
$builder
Definition:
generate-schema-cache.php:24
HTMLPurifier_ConfigSchema_InterchangeBuilder
Definition:
InterchangeBuilder.php:3
$schema_builder
$schema_builder
Definition:
generate-schema-cache.php:38
assertCli
assertCli()
Definition:
common.php:3
echo
$interchange
$interchange
Definition:
generate-schema-cache.php:25
php
libs
composer
vendor
ezyang
htmlpurifier
maintenance
generate-schema-cache.php
Generated on Fri Jan 17 2025 19:00:50 for ILIAS by
1.8.13 (using
Doxyfile
)