ILIAS
Release_4_1_x_branch Revision 61804
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
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
parent::__construct
(
false
);
// opacity is non-negative, but we will clamp it
8
}
9
10
public
function
validate
($number,
$config
, $context) {
11
$result
=
parent::validate
($number,
$config
, $context);
12
if
(
$result
===
false
)
return
$result
;
13
$float = (float)
$result
;
14
if
($float < 0.0)
$result
=
'0'
;
15
if
($float > 1.0)
$result
=
'1'
;
16
return
$result
;
17
}
18
19
}
20
21
// vim: et sw=4 sts=4
Services
Html
HtmlPurifier
library
HTMLPurifier
AttrDef
CSS
AlphaValue.php
Generated on Thu Apr 21 2016 19:02:50 for ILIAS by
1.8.1.2 (using
Doxyfile
)