Class HTMLPurifier_DefinitionCacheFactory

InheritanceHTMLPurifier_DefinitionCacheFactory

Responsible for creating definition caches.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addDecorator() Registers a decorator to add to all new cache objects HTMLPurifier_DefinitionCacheFactory
create() Factory method that creates a cache object based on configuration HTMLPurifier_DefinitionCacheFactory
instance() Retrieves an instance of global definition cache factory. HTMLPurifier_DefinitionCacheFactory
register() Registers a new definition cache object HTMLPurifier_DefinitionCacheFactory
setup() Initialize default decorators HTMLPurifier_DefinitionCacheFactory

Property Details

$caches protected property
protected $caches = ['Serializer' => []]
$decorators protected property
protected $decorators = []
$implementations protected property
protected $implementations = []

Method Details

addDecorator() public method

Registers a decorator to add to all new cache objects

public void addDecorator ( $decorator )
$decorator HTMLPurifier_DefinitionCache_Decorator|string

An instance or the name of a decorator

create() public method

Factory method that creates a cache object based on configuration

public mixed create ( $type, $config )
$type string

Name of definitions handled by cache

$config HTMLPurifier_Config

Config instance

instance() public static method

Retrieves an instance of global definition cache factory.

public static HTMLPurifier_DefinitionCacheFactory instance ( $prototype null )
$prototype HTMLPurifier_DefinitionCacheFactory
register() public method

Registers a new definition cache object

public void register ( $short, $long )
$short string

Short name of cache object, for reference

$long string

Full class name of cache object, for construction

setup() public method

Initialize default decorators

public void setup ( )