XOOPS 2.5.6
Final
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
NameSync.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_AttrTransform_NameSync
extends
HTMLPurifier_AttrTransform
9
{
10
11
public
function
__construct
() {
12
$this->idDef =
new
HTMLPurifier_AttrDef_HTML_ID
();
13
}
14
15
public
function
transform
($attr,
$config
, $context) {
16
if
(!isset($attr[
'name'
]))
return
$attr;
17
$name = $attr[
'name'
];
18
if
(isset($attr[
'id'
]) && $attr[
'id'
] === $name)
return
$attr;
19
$result
= $this->idDef->validate($name,
$config
, $context);
20
if
(
$result
===
false
) unset($attr[
'name'
]);
21
else
$attr[
'name'
] =
$result
;
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
NameSync.php
Generated on Fri May 10 2013 01:04:30 for XOOPS 2.5.6 by
1.8.3.1