Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
HTMLPurifier_DefinitionCacheFactory Class Reference

Public Member Functions

 addDecorator ($decorator)
 Registers a decorator to add to all new cache objects.
 
 create ($type, $config)
 Factory method that creates a cache object based on configuration.
 
 register ($short, $long)
 Registers a new definition cache object.
 
 setup ()
 Initialize default decorators.
 

Static Public Member Functions

static instance ($prototype=null)
 Retrieves an instance of global definition cache factory.
 

Protected Attributes

 $caches = array('Serializer' => array())
 @type array
 
 $decorators = array()
 @type HTMLPurifier_DefinitionCache_Decorator[]
 
 $implementations = array()
 @type array
 

Member Function Documentation

◆ addDecorator()

HTMLPurifier_DefinitionCacheFactory::addDecorator ( $decorator)

Registers a decorator to add to all new cache objects.

Parameters
HTMLPurifier_DefinitionCache_Decorator | string$decoratorAn instance or the name of a decorator

◆ create()

HTMLPurifier_DefinitionCacheFactory::create ( $type,
$config )

Factory method that creates a cache object based on configuration.

Parameters
string$typeName of definitions handled by cache
HTMLPurifier_Config$configConfig instance
Return values
mixed

◆ instance()

static HTMLPurifier_DefinitionCacheFactory::instance ( $prototype = null)
static

Retrieves an instance of global definition cache factory.

Parameters
HTMLPurifier_DefinitionCacheFactory$prototype
Return values
HTMLPurifier_DefinitionCacheFactory

◆ register()

HTMLPurifier_DefinitionCacheFactory::register ( $short,
$long )

Registers a new definition cache object.

Parameters
string$shortShort name of cache object, for reference
string$longFull class name of cache object, for construction

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