ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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 HTMLPurifier_DefinitionCache. More...
 
 $name
 
- Data Fields inherited from HTMLPurifier_DefinitionCache
 $type
 string More...
 

Detailed Description

Definition at line 3 of file Decorator.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_DefinitionCache_Decorator::__construct ( )

Definition at line 18 of file Decorator.php.

19  {
20  }

Member Function Documentation

◆ add()

HTMLPurifier_DefinitionCache_Decorator::add (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 50 of file Decorator.php.

51  {
52  return $this->cache->add($def, $config);
53  }

◆ cleanup()

HTMLPurifier_DefinitionCache_Decorator::cleanup (   $config)
Parameters
HTMLPurifier_Config$config
Returns
mixed

Definition at line 106 of file Decorator.php.

107  {
108  return $this->cache->cleanup($config);
109  }

◆ copy()

HTMLPurifier_DefinitionCache_Decorator::copy ( )

Cross-compatible clone substitute.

Returns
HTMLPurifier_DefinitionCache_Decorator

Definition at line 40 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
HTMLPurifier_DefinitionCache$cacheReference to cache object to decorate
Returns
HTMLPurifier_DefinitionCache_Decorator

Definition at line 27 of file Decorator.php.

References $cache, and copy().

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  }
copy()
Cross-compatible clone substitute.
Definition: Decorator.php:40
$cache
Cache object we are decorating HTMLPurifier_DefinitionCache.
Definition: Decorator.php:10
+ Here is the call graph for this function:

◆ flush()

HTMLPurifier_DefinitionCache_Decorator::flush (   $config)
Parameters
HTMLPurifier_Config$config
Returns
mixed

Definition at line 97 of file Decorator.php.

98  {
99  return $this->cache->flush($config);
100  }

◆ get()

HTMLPurifier_DefinitionCache_Decorator::get (   $config)
Parameters
HTMLPurifier_Config$config
Returns
mixed

Definition at line 79 of file Decorator.php.

80  {
81  return $this->cache->get($config);
82  }

◆ remove()

HTMLPurifier_DefinitionCache_Decorator::remove (   $config)
Parameters
HTMLPurifier_Config$config
Returns
mixed

Definition at line 88 of file Decorator.php.

89  {
90  return $this->cache->remove($config);
91  }

◆ replace()

HTMLPurifier_DefinitionCache_Decorator::replace (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 70 of file Decorator.php.

71  {
72  return $this->cache->replace($def, $config);
73  }

◆ set()

HTMLPurifier_DefinitionCache_Decorator::set (   $def,
  $config 
)
Parameters
HTMLPurifier_Definition$def
HTMLPurifier_Config$config
Returns
mixed

Definition at line 60 of file Decorator.php.

61  {
62  return $this->cache->set($def, $config);
63  }

Field Documentation

◆ $cache

HTMLPurifier_DefinitionCache_Decorator::$cache

Cache object we are decorating HTMLPurifier_DefinitionCache.

Definition at line 10 of file Decorator.php.

Referenced by decorate().

◆ $name

HTMLPurifier_DefinitionCache_Decorator::$name

Definition at line 16 of file Decorator.php.


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