Whoops, forgot to edit WHATSNEW
[htmlpurifier.git] / library / HTMLPurifier / AttrDef / Clone.php
blob6698a00c019b5028b64a8d13f346ec988b521605
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.
11 * @type HTMLPurifier_AttrDef
13 protected $clone;
15 /**
16 * @param HTMLPurifier_AttrDef $clone
18 public function __construct($clone)
20 $this->clone = $clone;
23 /**
24 * @param string $v
25 * @param HTMLPurifier_Config $config
26 * @param HTMLPurifier_Context $context
27 * @return bool|string
29 public function validate($v, $config, $context)
31 return $this->clone->validate($v, $config, $context);
34 /**
35 * @param string $string
36 * @return HTMLPurifier_AttrDef
38 public function make($string)
40 return clone $this->clone;
44 // vim: et sw=4 sts=4