HTMLPurifier_DefinitionCache_Null
extends HTMLPurifier_DefinitionCache
in package
Null cache object to use when no caching is on.
Table of Contents
Properties
- $type : mixed
Methods
- __construct() : mixed
- add() : bool
- Adds a definition object to the cache
- checkDefType() : bool
- Checks if a definition's type jives with the cache's type
- cleanup() : bool
- Clears all expired (older version or revision) objects from cache
- flush() : bool
- Clears all objects from cache
- generateKey() : string
- Generates a unique identifier for a particular configuration
- get() : bool
- Retrieves a definition object from the cache
- isOld() : bool
- Tests whether or not a key is old with respect to the configuration's version and revision number.
- remove() : bool
- Removes a definition object to the cache
- replace() : bool
- Replace an object in the cache
- set() : bool
- Unconditionally saves a definition object to the cache
Properties
$type
public
mixed
$type
Tags
Methods
__construct()
public
__construct(string $type) : mixed
Parameters
- $type : string
-
Type of definition objects this instance of the cache will handle.
add()
Adds a definition object to the cache
public
add(HTMLPurifier_Definition $def, HTMLPurifier_Config $config) : bool
Parameters
- $def : HTMLPurifier_Definition
- $config : HTMLPurifier_Config
Return values
boolcheckDefType()
Checks if a definition's type jives with the cache's type
public
checkDefType(HTMLPurifier_Definition $def) : bool
Parameters
- $def : HTMLPurifier_Definition
-
Definition object to check
Tags
Return values
bool —true if good, false if not
cleanup()
Clears all expired (older version or revision) objects from cache
public
cleanup(HTMLPurifier_Config $config) : bool
Parameters
- $config : HTMLPurifier_Config
Return values
boolflush()
Clears all objects from cache
public
flush(HTMLPurifier_Config $config) : bool
Parameters
- $config : HTMLPurifier_Config
Return values
boolgenerateKey()
Generates a unique identifier for a particular configuration
public
generateKey(HTMLPurifier_Config $config) : string
Parameters
- $config : HTMLPurifier_Config
-
Instance of HTMLPurifier_Config
Return values
stringget()
Retrieves a definition object from the cache
public
get(HTMLPurifier_Config $config) : bool
Parameters
- $config : HTMLPurifier_Config
Return values
boolisOld()
Tests whether or not a key is old with respect to the configuration's version and revision number.
public
isOld(string $key, HTMLPurifier_Config $config) : bool
Parameters
- $key : string
-
Key to test
- $config : HTMLPurifier_Config
-
Instance of HTMLPurifier_Config to test against
Return values
boolremove()
Removes a definition object to the cache
public
remove(HTMLPurifier_Config $config) : bool
Parameters
- $config : HTMLPurifier_Config
Return values
boolreplace()
Replace an object in the cache
public
replace(HTMLPurifier_Definition $def, HTMLPurifier_Config $config) : bool
Parameters
- $def : HTMLPurifier_Definition
- $config : HTMLPurifier_Config
Return values
boolset()
Unconditionally saves a definition object to the cache
public
set(HTMLPurifier_Definition $def, HTMLPurifier_Config $config) : bool
Parameters
- $def : HTMLPurifier_Definition
- $config : HTMLPurifier_Config