XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
Optional.php
Go to the documentation of this file.
1
<?php
2
10
class
HTMLPurifier_ChildDef_Optional
extends
HTMLPurifier_ChildDef_Required
11
{
12
public
$allow_empty
=
true
;
13
public
$type
=
'optional'
;
14
public
function
validateChildren
($tokens_of_children,
$config
, $context) {
15
$result
= parent::validateChildren($tokens_of_children,
$config
, $context);
16
// we assume that $tokens_of_children is not modified
17
if
(
$result
===
false
) {
18
if
(empty($tokens_of_children))
return
true
;
19
elseif ($this->whitespace)
return
$tokens_of_children;
20
else
return
array();
21
}
22
return
$result
;
23
}
24
}
25
26
// vim: et sw=4 sts=4
L:
0xoops
xoops-2.5.6
htdocs
xoops_lib
modules
protector
library
HTMLPurifier
ChildDef
Optional.php
Generated on Fri May 10 2013 01:04:30 for XOOPS 2.5.6 by
1.8.3.1