ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups 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.
 copy ()
 Cross-compatible clone substitute.
 add ($def, $config)
 Adds a definition object to the cache.
 set ($def, $config)
 Unconditionally saves a definition object to the cache.
 replace ($def, $config)
 Replace an object in the cache.
 get ($config)
 Retrieves a definition object from the cache.
 remove ($config)
 Removes a definition object to the cache.
 flush ($config)
 Clears all objects from cache.
 cleanup ($config)
 Clears all expired (older version or revision) objects from cache.
- Public Member Functions inherited from HTMLPurifier_DefinitionCache
 __construct ($type)
 generateKey ($config)
 Generates a unique identifier for a particular configuration.
 isOld ($key, $config)
 Tests whether or not a key is old with respect to the configuration's version and revision number.
 checkDefType ($def)
 Checks if a definition's type jives with the cache's type.

Data Fields

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

Detailed Description

Definition at line 3 of file Decorator.php.

Constructor & Destructor Documentation

HTMLPurifier_DefinitionCache_Decorator::__construct ( )

Definition at line 11 of file Decorator.php.

{}

Member Function Documentation

HTMLPurifier_DefinitionCache_Decorator::add (   $def,
  $config 
)

Adds a definition object to the cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Reimplemented in HTMLPurifier_DefinitionCache_Decorator_Memory, and HTMLPurifier_DefinitionCache_Decorator_Cleanup.

Definition at line 32 of file Decorator.php.

References $config.

{
return $this->cache->add($def, $config);
}
HTMLPurifier_DefinitionCache_Decorator::cleanup (   $config)

Clears all expired (older version or revision) objects from cache.

Note
Be carefuly implementing this method as flush. Flush must not interfere with other Definition types, and cleanup() should not be repeatedly called by userland code.

Reimplemented from HTMLPurifier_DefinitionCache.

Definition at line 56 of file Decorator.php.

References $config.

Referenced by HTMLPurifier_DefinitionCache_Decorator_Cleanup\add(), HTMLPurifier_DefinitionCache_Decorator_Cleanup\get(), HTMLPurifier_DefinitionCache_Decorator_Cleanup\replace(), and HTMLPurifier_DefinitionCache_Decorator_Cleanup\set().

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

+ Here is the caller graph for this function:

HTMLPurifier_DefinitionCache_Decorator::copy ( )

Cross-compatible clone substitute.

Reimplemented in HTMLPurifier_DefinitionCache_Decorator_Memory, and HTMLPurifier_DefinitionCache_Decorator_Cleanup.

Definition at line 28 of file Decorator.php.

Referenced by decorate().

+ Here is the caller graph for this function:

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().

{
$decorator = $this->copy();
// reference is necessary for mocks in PHP 4
$decorator->cache =& $cache;
$decorator->type = $cache->type;
return $decorator;
}

+ Here is the call graph for this function:

HTMLPurifier_DefinitionCache_Decorator::flush (   $config)

Clears all objects from cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Definition at line 52 of file Decorator.php.

References $config.

{
return $this->cache->flush($config);
}
HTMLPurifier_DefinitionCache_Decorator::get (   $config)

Retrieves a definition object from the cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Reimplemented in HTMLPurifier_DefinitionCache_Decorator_Memory, and HTMLPurifier_DefinitionCache_Decorator_Cleanup.

Definition at line 44 of file Decorator.php.

References $config.

{
return $this->cache->get($config);
}
HTMLPurifier_DefinitionCache_Decorator::remove (   $config)

Removes a definition object to the cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Definition at line 48 of file Decorator.php.

References $config.

{
return $this->cache->remove($config);
}
HTMLPurifier_DefinitionCache_Decorator::replace (   $def,
  $config 
)

Replace an object in the cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Reimplemented in HTMLPurifier_DefinitionCache_Decorator_Memory, and HTMLPurifier_DefinitionCache_Decorator_Cleanup.

Definition at line 40 of file Decorator.php.

References $config.

{
return $this->cache->replace($def, $config);
}
HTMLPurifier_DefinitionCache_Decorator::set (   $def,
  $config 
)

Unconditionally saves a definition object to the cache.

Reimplemented from HTMLPurifier_DefinitionCache.

Reimplemented in HTMLPurifier_DefinitionCache_Decorator_Memory, and HTMLPurifier_DefinitionCache_Decorator_Cleanup.

Definition at line 36 of file Decorator.php.

References $config.

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

Field Documentation

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: