]> git.wh0rd.org - tt-rss.git/blob - lib/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php
ce68dbd546916a04a61ba6450fb988556d93468e
[tt-rss.git] / lib / htmlpurifier / library / HTMLPurifier / AttrDef / Clone.php
1 <?php
2
3 /**
4 * Dummy AttrDef that mimics another AttrDef, BUT it generates clones
5 * with make.
6 */
7 class HTMLPurifier_AttrDef_Clone extends HTMLPurifier_AttrDef
8 {
9 /**
10 * What we're cloning
11 */
12 protected $clone;
13
14 public function __construct($clone) {
15 $this->clone = $clone;
16 }
17
18 public function validate($v, $config, $context) {
19 return $this->clone->validate($v, $config, $context);
20 }
21
22 public function make($string) {
23 return clone $this->clone;
24 }
25
26 }
27
28 // vim: et sw=4 sts=4