ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
HTMLPurifier_DefinitionCache_Decorator Class Reference
+ Inheritance diagram for HTMLPurifier_DefinitionCache_Decorator:
+ Collaboration diagram for HTMLPurifier_DefinitionCache_Decorator:

Public Member Functions

 __construct ()
 
 decorate (&$cache)
 Lazy decorator function. More...
 
 copy ()
 Cross-compatible clone substitute. More...
 
 add ($def, $config)
 
 set ($def, $config)
 
 replace ($def, $config)
 
 get ($config)
 
 remove ($config)
 
 flush ($config)
 
 cleanup ($config)
 
- Public Member Functions inherited from HTMLPurifier_DefinitionCache
 __construct ($type)
 
 generateKey ($config)
 Generates a unique identifier for a particular configuration. More...
 
 isOld ($key, $config)
 Tests whether or not a key is old with respect to the configuration's version and revision number. More...
 
 checkDefType ($def)
 Checks if a definition's type jives with the cache's type. More...
 
 add ($def, $config)
 Adds a definition object to the cache. More...
 
 set ($def, $config)
 Unconditionally saves a definition object to the cache. More...
 
 replace ($def, $config)
 Replace an object in the cache. More...
 
 get ($config)
 Retrieves a definition object from the cache. More...
 
 remove ($config)
 Removes a definition object to the cache. More...
 
 flush ($config)
 Clears all objects from cache. More...
 
 cleanup ($config)
 Clears all expired (older version or revision) objects from cache. More...
 

Data Fields

 $cache
 Cache object we are decorating. More...
 
- Data Fields inherited from HTMLPurifier_DefinitionCache
 $type
 

Detailed Description

Definition at line 3 of file Decorator.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_DefinitionCache_Decorator::__construct ( )

Definition at line 11 of file Decorator.php.

11 {}

Member Function Documentation

◆ add()

HTMLPurifier_DefinitionCache_Decorator::add (   $def,
  $config 
)

Definition at line 32 of file Decorator.php.

32  {
33  return $this->cache->add($def, $config);
34  }

◆ cleanup()

HTMLPurifier_DefinitionCache_Decorator::cleanup (   $config)

Definition at line 56 of file Decorator.php.

56  {
57  return $this->cache->cleanup($config);
58  }

◆ copy()

HTMLPurifier_DefinitionCache_Decorator::copy ( )

Cross-compatible clone substitute.

Definition at line 28 of file Decorator.php.

Referenced by decorate().

+ Here is the caller graph for this function:

◆ decorate()

HTMLPurifier_DefinitionCache_Decorator::decorate ( $cache)

Lazy decorator function.

Parameters
$cacheReference to cache object to decorate

Definition at line 17 of file Decorator.php.

References $cache, and copy().

17  {
18  $decorator = $this->copy();
19  // reference is necessary for mocks in PHP 4
20  $decorator->cache =& $cache;
21  $decorator->type = $cache->type;
22  return $decorator;
23  }
copy()
Cross-compatible clone substitute.
Definition: Decorator.php:28
$cache
Cache object we are decorating.
Definition: Decorator.php:9
+ Here is the call graph for this function:

◆ flush()

HTMLPurifier_DefinitionCache_Decorator::flush (   $config)

Definition at line 52 of file Decorator.php.

52  {
53  return $this->cache->flush($config);
54  }

◆ get()

HTMLPurifier_DefinitionCache_Decorator::get (   $config)

Definition at line 44 of file Decorator.php.

44  {
45  return $this->cache->get($config);
46  }

◆ remove()

HTMLPurifier_DefinitionCache_Decorator::remove (   $config)

Definition at line 48 of file Decorator.php.

48  {
49  return $this->cache->remove($config);
50  }

◆ replace()

HTMLPurifier_DefinitionCache_Decorator::replace (   $def,
  $config 
)

Definition at line 40 of file Decorator.php.

40  {
41  return $this->cache->replace($def, $config);
42  }

◆ set()

HTMLPurifier_DefinitionCache_Decorator::set (   $def,
  $config 
)

Definition at line 36 of file Decorator.php.

36  {
37  return $this->cache->set($def, $config);
38  }

Field Documentation

◆ $cache

HTMLPurifier_DefinitionCache_Decorator::$cache

Cache object we are decorating.

Definition at line 9 of file Decorator.php.

Referenced by decorate().


The documentation for this class was generated from the following file: