Property | Type | Description | |
---|---|---|---|
$cache | Structure is: $factory->cache[$language_code][$key] = $value | ||
$keys | Valid keys in the HTMLPurifier_Language object. Designates which variables to slurp out of a message file. |
Property | Type | Description | |
---|---|---|---|
$dir | Cached copy of dirname(__FILE__), directory of current file without trailing slash. | ||
$mergeable_keys_list | Keys whose contents are a list and can be merged. | ||
$mergeable_keys_map | Keys whose contents are a hash map and can be merged. | ||
$validator | Instance to validate language codes. |
Method | Description | |
---|---|---|
create ( HTMLPurifier_Config $config, HTMLPurifier_Context $context, boolean | string $code = false ) : HTMLPurifier_Language | Creates a language object, handles class fallbacks | |
getFallbackFor ( string $code ) : string | boolean | Returns the fallback language for language | |
instance ( HTMLPurifier_LanguageFactory $prototype = null ) : HTMLPurifier_LanguageFactory | Retrieve sole instance of the factory. | |
loadLanguage ( string $code ) | Loads language into the cache, handles message file and fallbacks | |
setup ( ) | Sets up the singleton, much like a constructor |
public static instance ( HTMLPurifier_LanguageFactory $prototype = null ) : HTMLPurifier_LanguageFactory | ||
$prototype | HTMLPurifier_LanguageFactory | Optional prototype to overload sole instance with, or bool true to reset to default factory. |
return | HTMLPurifier_LanguageFactory |
public loadLanguage ( string $code ) | ||
$code | string | language code |
public $cache |
protected $dir |
public $keys |
protected $mergeable_keys_list |
protected $mergeable_keys_map |