|
HTMLPurifier 4.4.0
|
Class responsible for generating HTMLPurifier_Language objects, managing caching and fallbacks. More...
Public Member Functions | |
| setup () | |
| Sets up the singleton, much like a constructor. | |
| create ($config, $context, $code=false) | |
| Creates a language object, handles class fallbacks. | |
| getFallbackFor ($code) | |
| Returns the fallback language for language. | |
| loadLanguage ($code) | |
| Loads language into the cache, handles message file and fallbacks. | |
| setup () | |
| Sets up the singleton, much like a constructor. | |
| create ($config, $context, $code=false) | |
| Creates a language object, handles class fallbacks. | |
| getFallbackFor ($code) | |
| Returns the fallback language for language. | |
| loadLanguage ($code) | |
| Loads language into the cache, handles message file and fallbacks. | |
Static Public Member Functions | |
| static | instance ($prototype=null) |
| Retrieve sole instance of the factory. | |
| static | instance ($prototype=null) |
| Retrieve sole instance of the factory. | |
Public Attributes | |
| $cache | |
| Cache of language code information used to load HTMLPurifier_Language objects Structure is: $factory->cache[$language_code][$key] = $value array map. | |
| $keys = array('fallback', 'messages', 'errorNames') | |
| Valid keys in the HTMLPurifier_Language object. | |
Protected Attributes | |
| $validator | |
| Instance of HTMLPurifier_AttrDef_Lang to validate language codes object HTMLPurifier_AttrDef_Lang. | |
| $dir | |
| Cached copy of dirname(__FILE__), directory of current file without trailing slash string filename. | |
| $mergeable_keys_map = array('messages' => true, 'errorNames' => true) | |
| Keys whose contents are a hash map and can be merged array lookup. | |
| $mergeable_keys_list = array() | |
| Keys whose contents are a list and can be merged array lookup. | |
Class responsible for generating HTMLPurifier_Language objects, managing caching and fallbacks.
Definition at line 10 of file LanguageFactory.php.
| HTMLPurifier_LanguageFactory::create | ( | $ | config, |
| $ | context, | ||
| $ | code = false |
||
| ) |
Creates a language object, handles class fallbacks.
| $config | Instance of HTMLPurifier_Config |
| $context | Instance of HTMLPurifier_Context |
| $code | Code to override configuration with. Private parameter. |
Definition at line 83 of file LanguageFactory.php.
References $config, $fallback, and getFallbackFor().
Referenced by create().
| HTMLPurifier_LanguageFactory::create | ( | $ | config, |
| $ | context, | ||
| $ | code = false |
||
| ) |
Creates a language object, handles class fallbacks.
| $config | Instance of HTMLPurifier_Config |
| $context | Instance of HTMLPurifier_Context |
| $code | Code to override configuration with. Private parameter. |
Definition at line 5961 of file HTMLPurifier.standalone.php.
References $config, $fallback, create(), and getFallbackFor().
| HTMLPurifier_LanguageFactory::getFallbackFor | ( | $ | code | ) |
Returns the fallback language for language.
| $code | string language code |
Definition at line 129 of file LanguageFactory.php.
References loadLanguage().
Referenced by create().
| HTMLPurifier_LanguageFactory::getFallbackFor | ( | $ | code | ) |
Returns the fallback language for language.
| $code | string language code |
Definition at line 6007 of file HTMLPurifier.standalone.php.
References loadLanguage().
| static HTMLPurifier_LanguageFactory::instance | ( | $ | prototype = null | ) | [static] |
Retrieve sole instance of the factory.
| $prototype | Optional prototype to overload sole instance with, or bool true to reset to default factory. |
Definition at line 57 of file LanguageFactory.php.
Referenced by HTMLPurifier_Language::load().
| static HTMLPurifier_LanguageFactory::instance | ( | $ | prototype = null | ) | [static] |
Retrieve sole instance of the factory.
| $prototype | Optional prototype to overload sole instance with, or bool true to reset to default factory. |
Definition at line 5935 of file HTMLPurifier.standalone.php.
| HTMLPurifier_LanguageFactory::loadLanguage | ( | $ | code | ) |
Loads language into the cache, handles message file and fallbacks.
| $code | string language code |
Definition at line 138 of file LanguageFactory.php.
References $cache, and $fallback.
Referenced by getFallbackFor(), and loadLanguage().
| HTMLPurifier_LanguageFactory::loadLanguage | ( | $ | code | ) |
Loads language into the cache, handles message file and fallbacks.
| $code | string language code |
Definition at line 6016 of file HTMLPurifier.standalone.php.
References $cache, $fallback, and loadLanguage().
| HTMLPurifier_LanguageFactory::setup | ( | ) |
Sets up the singleton, much like a constructor.
Definition at line 5950 of file HTMLPurifier.standalone.php.
| HTMLPurifier_LanguageFactory::setup | ( | ) |
Sets up the singleton, much like a constructor.
Definition at line 72 of file LanguageFactory.php.
| HTMLPurifier_LanguageFactory::$cache |
Cache of language code information used to load HTMLPurifier_Language objects Structure is: $factory->cache[$language_code][$key] = $value array map.
Definition at line 18 of file LanguageFactory.php.
Referenced by loadLanguage().
HTMLPurifier_LanguageFactory::$dir [protected] |
Cached copy of dirname(__FILE__), directory of current file without trailing slash string filename.
Definition at line 38 of file LanguageFactory.php.
| HTMLPurifier_LanguageFactory::$keys = array('fallback', 'messages', 'errorNames') |
Valid keys in the HTMLPurifier_Language object.
Designates which variables to slurp out of a message file. array list
Definition at line 25 of file LanguageFactory.php.
HTMLPurifier_LanguageFactory::$mergeable_keys_list = array() [protected] |
Keys whose contents are a list and can be merged array lookup.
Definition at line 50 of file LanguageFactory.php.
HTMLPurifier_LanguageFactory::$mergeable_keys_map = array('messages' => true, 'errorNames' => true) [protected] |
Keys whose contents are a hash map and can be merged array lookup.
Definition at line 44 of file LanguageFactory.php.
HTMLPurifier_LanguageFactory::$validator [protected] |
Instance of HTMLPurifier_AttrDef_Lang to validate language codes object HTMLPurifier_AttrDef_Lang.
Definition at line 31 of file LanguageFactory.php.