]> git.wh0rd.org - tt-rss.git/blame - lib/htmlpurifier/library/HTMLPurifier/AttrDef/Clone.php
Revert "remove htmlpurifier"
[tt-rss.git] / lib / htmlpurifier / library / HTMLPurifier / AttrDef / Clone.php
CommitLineData
010efc9b
AD
1<?php
2
3/**
4 * Dummy AttrDef that mimics another AttrDef, BUT it generates clones
5 * with make.
6 */
7class 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