Class HTMLPurifier_LanguageFactory

Description

Class responsible for generating HTMLPurifier_Language objects, managing caching and fallbacks.

  • todo: Serialized cache for languages

Located in /lib/core/Parsers/htmlpurifier/HTMLPurifier.standalone.php (line 5550)


	
			
Variable Summary
mixed $cache
mixed $dir
mixed $keys
mixed $validator
Method Summary
static void instance ([$prototype $prototype = null])
void create ($config $config, $context $context, [$code $code = false])
void getFallbackFor ($code $code)
void loadLanguage ($code $code)
void setup ()
Variables
mixed $cache (line 5558)

Cache of language code information used to load HTMLPurifier_Language objects

Structure is: $factory->cache[$language_code][$key] = $value

  • access: public
mixed $dir (line 5578)

Cached copy of dirname(__FILE__), directory of current file without

trailing slash

  • access: protected
mixed $keys = array('fallback', 'messages', 'errorNames') (line 5565)

Valid keys in the HTMLPurifier_Language object. Designates which variables to slurp out of a message file.

  • access: public
mixed $mergeable_keys_list = array() (line 5590)

Keys whose contents are a list and can be merged

  • access: protected
mixed $mergeable_keys_map = array('messages' => true, 'errorNames' => true) (line 5584)

Keys whose contents are a hash map and can be merged

  • access: protected
mixed $validator (line 5571)

Instance of HTMLPurifier_AttrDef_Lang to validate language codes

  • access: protected
Methods
static method instance (line 5597)

Retrieve sole instance of the factory.

  • access: public
static void instance ([$prototype $prototype = null])
  • $prototype $prototype: Optional prototype to overload sole instance with, or bool true to reset to default factory.
create (line 5623)

Creates a language object, handles class fallbacks

  • access: public
void create ($config $config, $context $context, [$code $code = false])
  • $config $config: Instance of HTMLPurifier_Config
  • $context $context: Instance of HTMLPurifier_Context
  • $code $code: Code to override configuration with. Private parameter.
getFallbackFor (line 5669)

Returns the fallback language for language

  • access: public
void getFallbackFor ($code $code)
  • $code $code: string language code
loadLanguage (line 5678)

Loads language into the cache, handles message file and fallbacks

  • access: public
void loadLanguage ($code $code)
  • $code $code: string language code
setup (line 5612)

Sets up the singleton, much like a constructor

  • access: public
void setup ()

Documentation generated on Sun, 06 Mar 2011 00:24:09 -0500 by phpDocumentor 1.4.3