mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-02 04:10:25 +02:00
PSR-2 reformatting PHPDoc corrections
With minor corrections. Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk> Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
committed by
Edward Z. Yang
parent
19eee14899
commit
fac747bdbd
@@ -5,11 +5,18 @@
|
||||
*/
|
||||
class HTMLPurifier_DefinitionCacheFactory
|
||||
{
|
||||
|
||||
protected $caches = array('Serializer' => array());
|
||||
protected $implementations = array();
|
||||
/**
|
||||
* @var HTMLPurifier_DefinitionCache_Decorator[]
|
||||
* @type array
|
||||
*/
|
||||
protected $caches = array('Serializer' => array());
|
||||
|
||||
/**
|
||||
* @type array
|
||||
*/
|
||||
protected $implementations = array();
|
||||
|
||||
/**
|
||||
* @type HTMLPurifier_DefinitionCache_Decorator[]
|
||||
*/
|
||||
protected $decorators = array();
|
||||
|
||||
@@ -23,7 +30,7 @@ class HTMLPurifier_DefinitionCacheFactory
|
||||
|
||||
/**
|
||||
* Retrieves an instance of global definition cache factory.
|
||||
*
|
||||
* @param HTMLPurifier_DefinitionCacheFactory $prototype
|
||||
* @return HTMLPurifier_DefinitionCacheFactory
|
||||
*/
|
||||
public static function instance($prototype = null)
|
||||
@@ -50,9 +57,9 @@ class HTMLPurifier_DefinitionCacheFactory
|
||||
|
||||
/**
|
||||
* Factory method that creates a cache object based on configuration
|
||||
*
|
||||
* @param string $name Name of definitions handled by cache
|
||||
* @param string $type Name of definitions handled by cache
|
||||
* @param HTMLPurifier_Config $config Config instance
|
||||
* @return mixed
|
||||
*/
|
||||
public function create($type, $config)
|
||||
{
|
||||
@@ -63,10 +70,8 @@ class HTMLPurifier_DefinitionCacheFactory
|
||||
if (!empty($this->caches[$method][$type])) {
|
||||
return $this->caches[$method][$type];
|
||||
}
|
||||
if (
|
||||
isset($this->implementations[$method]) &&
|
||||
class_exists($class = $this->implementations[$method], false)
|
||||
) {
|
||||
if (isset($this->implementations[$method]) &&
|
||||
class_exists($class = $this->implementations[$method], false)) {
|
||||
$cache = new $class($type);
|
||||
} else {
|
||||
if ($method != 'Serializer') {
|
||||
@@ -96,7 +101,6 @@ class HTMLPurifier_DefinitionCacheFactory
|
||||
}
|
||||
$this->decorators[$decorator->name] = $decorator;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user