ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Decorator.php
Go to the documentation of this file.
1 <?php
2 
4 {
5 
10  public $cache;
11 
16  public $name;
17 
18  public function __construct()
19  {
20  }
21 
27  public function decorate(&$cache)
28  {
29  $decorator = $this->copy();
30  // reference is necessary for mocks in PHP 4
31  $decorator->cache =& $cache;
32  $decorator->type = $cache->type;
33  return $decorator;
34  }
35 
40  public function copy()
41  {
43  }
44 
50  public function add($def, $config)
51  {
52  return $this->cache->add($def, $config);
53  }
54 
60  public function set($def, $config)
61  {
62  return $this->cache->set($def, $config);
63  }
64 
70  public function replace($def, $config)
71  {
72  return $this->cache->replace($def, $config);
73  }
74 
79  public function get($config)
80  {
81  return $this->cache->get($config);
82  }
83 
88  public function remove($config)
89  {
90  return $this->cache->remove($config);
91  }
92 
97  public function flush($config)
98  {
99  return $this->cache->flush($config);
100  }
101 
106  public function cleanup($config)
107  {
108  return $this->cache->cleanup($config);
109  }
110 }
111 
112 // vim: et sw=4 sts=4
Abstract class representing Definition cache managers that implements useful common methods and is a ...
decorate(&$cache)
Lazy decorator function.
Definition: Decorator.php:27
copy()
Cross-compatible clone substitute.
Definition: Decorator.php:40
$cache
Cache object we are decorating HTMLPurifier_DefinitionCache.
Definition: Decorator.php:10