Abstract Class HTMLPurifier_DefinitionCache

InheritanceHTMLPurifier_DefinitionCache
SubclassesHTMLPurifier_DefinitionCache_Decorator, HTMLPurifier_DefinitionCache_Decorator_Cleanup, HTMLPurifier_DefinitionCache_Decorator_Memory, HTMLPurifier_DefinitionCache_Null, HTMLPurifier_DefinitionCache_Serializer

Abstract class representing Definition cache managers that implements useful common methods and is a factory.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$type HTMLPurifier_DefinitionCache

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_DefinitionCache
add() Adds a definition object to the cache HTMLPurifier_DefinitionCache
checkDefType() Checks if a definition's type jives with the cache's type HTMLPurifier_DefinitionCache
cleanup() Clears all expired (older version or revision) objects from cache HTMLPurifier_DefinitionCache
flush() Clears all objects from cache HTMLPurifier_DefinitionCache
generateKey() Generates a unique identifier for a particular configuration HTMLPurifier_DefinitionCache
get() Retrieves a definition object from the cache HTMLPurifier_DefinitionCache
isOld() Tests whether or not a key is old with respect to the configuration's version and revision number. HTMLPurifier_DefinitionCache
remove() Removes a definition object to the cache HTMLPurifier_DefinitionCache
replace() Replace an object in the cache HTMLPurifier_DefinitionCache
set() Unconditionally saves a definition object to the cache HTMLPurifier_DefinitionCache

Property Details

$type public property
public $type null

Method Details

__construct() public method

public void __construct ( $type )
$type string

Type of definition objects this instance of the

 cache will handle.
add() public abstract method

Adds a definition object to the cache

public abstract void add ( $def, $config )
$def HTMLPurifier_Definition
$config HTMLPurifier_Config
checkDefType() public method

Checks if a definition's type jives with the cache's type

public bool checkDefType ( $def )
$def HTMLPurifier_Definition

Definition object to check

return bool

True if good, false if not

cleanup() public abstract method

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

public abstract void cleanup ( $config )
$config HTMLPurifier_Config
flush() public abstract method

Clears all objects from cache

public abstract void flush ( $config )
$config HTMLPurifier_Config
generateKey() public method

Generates a unique identifier for a particular configuration

public string generateKey ( $config )
$config HTMLPurifier_Config

Instance of HTMLPurifier_Config

get() public abstract method

Retrieves a definition object from the cache

public abstract void get ( $config )
$config HTMLPurifier_Config
isOld() public method

Tests whether or not a key is old with respect to the configuration's version and revision number.

public bool isOld ( $key, $config )
$key string

Key to test

$config HTMLPurifier_Config

Instance of HTMLPurifier_Config to test against

remove() public abstract method

Removes a definition object to the cache

public abstract void remove ( $config )
$config HTMLPurifier_Config
replace() public abstract method

Replace an object in the cache

public abstract void replace ( $def, $config )
$def HTMLPurifier_Definition
$config HTMLPurifier_Config
set() public abstract method

Unconditionally saves a definition object to the cache

public abstract void set ( $def, $config )
$def HTMLPurifier_Definition
$config HTMLPurifier_Config