XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
Length.php
Go to the documentation of this file.
1
<?php
2
6
class
HTMLPurifier_AttrTransform_Length
extends
HTMLPurifier_AttrTransform
7
{
8
9
protected
$name
;
10
protected
$cssName
;
11
12
public
function
__construct
(
$name
, $css_name = null) {
13
$this->name =
$name
;
14
$this->cssName = $css_name ? $css_name :
$name
;
15
}
16
17
public
function
transform
($attr,
$config
, $context) {
18
if
(!isset($attr[$this->name]))
return
$attr;
19
$length = $this->
confiscateAttr
($attr, $this->name);
20
if
(ctype_digit($length)) $length .=
'px'
;
21
$this->
prependCSS
($attr, $this->cssName .
":$length;"
);
22
return
$attr;
23
}
24
25
}
26
27
// vim: et sw=4 sts=4
L:
0xoops
xoops-2.5.6
htdocs
xoops_lib
modules
protector
library
HTMLPurifier
AttrTransform
Length.php
Generated on Fri May 10 2013 01:04:29 for XOOPS 2.5.6 by
1.8.3.1