ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
flush-definition-cache.php
Go to the documentation of this file.
1
#!/usr/bin/php
2
<?php
3
4
chdir(dirname(__FILE__));
5
require_once
'common.php'
;
6
assertCli
();
7
19
echo
"Flushing cache... \n"
;
20
21
require_once(dirname(__FILE__) .
'/../library/HTMLPurifier.auto.php'
);
22
23
$config
=
HTMLPurifier_Config::createDefault
();
24
25
$names
=
array
(
'HTML'
,
'CSS'
,
'URI'
,
'Test'
);
26
if
(isset(
$argv
[1])) {
27
if
(in_array(
$argv
[1],
$names
)) {
28
$names
=
array
(
$argv
[1]);
29
}
else
{
30
throw
new
Exception
(
"Cache parameter {$argv[1]} is not a valid cache"
);
31
}
32
}
33
34
foreach
(
$names
as
$name
) {
35
echo
" - Flushing $name\n"
;
36
$cache =
new
HTMLPurifier_DefinitionCache_Serializer
($name);
37
$cache->flush(
$config
);
38
}
39
40
echo
"Cache flushed successfully.\n"
;
41
42
// vim: et sw=4 sts=4
$config
$config
Definition:
flush-definition-cache.php:23
$argv
global $argv
Definition:
svg-scanner.php:41
HTMLPurifier_DefinitionCache_Serializer
Definition:
Serializer.php:3
$name
if($format !==null) $name
Definition:
metadata.php:146
HTMLPurifier_Config\createDefault
static createDefault()
Convenience constructor that creates a default configuration object.
Definition:
Config.php:154
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
assertCli
assertCli()
Definition:
common.php:3
$names
$names
Definition:
flush-definition-cache.php:25
Exception
libs
composer
vendor
ezyang
htmlpurifier
maintenance
flush-definition-cache.php
Generated on Tue Jan 14 2025 19:01:02 for ILIAS by
1.8.13 (using
Doxyfile
)