Make forms work for transitional doctypes.
[htmlpurifier.git] / library / HTMLPurifier / AttrDef / Clone.php
blobce68dbd546916a04a61ba6450fb988556d93468e
1 <?php
3 /**
4 * Dummy AttrDef that mimics another AttrDef, BUT it generates clones
5 * with make.
6 */
7 class HTMLPurifier_AttrDef_Clone extends HTMLPurifier_AttrDef
9 /**
10 * What we're cloning
12 protected $clone;
14 public function __construct($clone) {
15 $this->clone = $clone;
18 public function validate($v, $config, $context) {
19 return $this->clone->validate($v, $config, $context);
22 public function make($string) {
23 return clone $this->clone;
28 // vim: et sw=4 sts=4