HTMLPurifier 4.4.0
/home/ezyang/Dev/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php
Go to the documentation of this file.
00001 <?php
00002 
00003 class HTMLPurifier_DefinitionCache_Decorator extends HTMLPurifier_DefinitionCache
00004 {
00005 
00009     public $cache;
00010 
00011     public function __construct() {}
00012 
00017     public function decorate(&$cache) {
00018         $decorator = $this->copy();
00019         // reference is necessary for mocks in PHP 4
00020         $decorator->cache =& $cache;
00021         $decorator->type  = $cache->type;
00022         return $decorator;
00023     }
00024 
00028     public function copy() {
00029         return new HTMLPurifier_DefinitionCache_Decorator();
00030     }
00031 
00032     public function add($def, $config) {
00033         return $this->cache->add($def, $config);
00034     }
00035 
00036     public function set($def, $config) {
00037         return $this->cache->set($def, $config);
00038     }
00039 
00040     public function replace($def, $config) {
00041         return $this->cache->replace($def, $config);
00042     }
00043 
00044     public function get($config) {
00045         return $this->cache->get($config);
00046     }
00047 
00048     public function remove($config) {
00049         return $this->cache->remove($config);
00050     }
00051 
00052     public function flush($config) {
00053         return $this->cache->flush($config);
00054     }
00055 
00056     public function cleanup($config) {
00057         return $this->cache->cleanup($config);
00058     }
00059 
00060 }
00061 
00062 // vim: et sw=4 sts=4