ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
AlphaValue.php
Go to the documentation of this file.
1
<?php
2
3
class
HTMLPurifier_AttrDef_CSS_AlphaValue
extends
HTMLPurifier_AttrDef_CSS_Number
4
{
5
6
public
function
__construct
()
7
{
8
parent::__construct(
false
);
// opacity is non-negative, but we will clamp it
9
}
10
17
public
function
validate
($number, $config, $context)
18
{
19
$result
= parent::validate($number, $config, $context);
20
if
(
$result
===
false
) {
21
return
$result
;
22
}
23
$float = (float)
$result
;
24
if
($float < 0.0) {
25
$result
=
'0'
;
26
}
27
if
($float > 1.0) {
28
$result
=
'1'
;
29
}
30
return
$result
;
31
}
32
}
33
34
// vim: et sw=4 sts=4
HTMLPurifier_AttrDef_CSS_AlphaValue\validate
validate($number, $config, $context)
Definition:
AlphaValue.php:17
$result
$result
Definition:
CleanUpTest.php:407
HTMLPurifier_AttrDef_CSS_Number
Validates a number as defined by the CSS spec.
Definition:
Number.php:6
HTMLPurifier_AttrDef_CSS_AlphaValue
Definition:
AlphaValue.php:3
HTMLPurifier_AttrDef_CSS_AlphaValue\__construct
__construct()
Definition:
AlphaValue.php:6
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
CSS
AlphaValue.php
Generated on Mon Mar 31 2025 19:00:46 for ILIAS by
1.8.13 (using
Doxyfile
)