ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Optional.php
Go to the documentation of this file.
1
<?
php
2
10
class
HTMLPurifier_ChildDef_Optional
extends
HTMLPurifier_ChildDef_Required
11
{
15
public
$allow_empty
=
true
;
16
20
public
$type
=
'optional'
;
21
28
public
function
validateChildren
($children,
$config
,
$context
)
29
{
30
$result
= parent::validateChildren($children,
$config
,
$context
);
31
// we assume that $children is not modified
32
if
(
$result
===
false
) {
33
if
(empty($children)) {
34
return
true
;
35
} elseif ($this->whitespace) {
36
return
$children;
37
}
else
{
38
return
array();
39
}
40
}
41
return
$result
;
42
}
43
}
44
45
// vim: et sw=4 sts=4
HTMLPurifier_ChildDef_Optional\$allow_empty
$allow_empty
bool
Definition:
Optional.php:15
HTMLPurifier_ChildDef_Required
Definition that allows a set of elements, but disallows empty children.
Definition:
Required.php:6
$context
$context
Definition:
webdav.php:25
$config
$config
Definition:
bootstrap.php:15
$result
$result
Definition:
CleanUpTest.php:463
HTMLPurifier_ChildDef_Optional
Definition that allows a set of elements, and allows no children.
Definition:
Optional.php:10
HTMLPurifier_ChildDef_Optional\$type
$type
string
Definition:
Optional.php:20
HTMLPurifier_ChildDef_Optional\validateChildren
validateChildren($children, $config, $context)
Definition:
Optional.php:28
php
libs
composer
vendor
ezyang
htmlpurifier
library
HTMLPurifier
ChildDef
Optional.php
Generated on Thu Jan 16 2025 19:01:38 for ILIAS by
1.8.13 (using
Doxyfile
)