PHP Класс HTMLPurifier_LanguageFactory, yii

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
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

Описание методов

create() публичный Метод

Creates a language object, handles class fallbacks
public create ( HTMLPurifier_Config $config, HTMLPurifier_Context $context, boolean | string $code = false ) : HTMLPurifier_Language
$config HTMLPurifier_Config
$context HTMLPurifier_Context
$code boolean | string Code to override configuration with. Private parameter.
Результат HTMLPurifier_Language

getFallbackFor() публичный Метод

Returns the fallback language for language
public getFallbackFor ( string $code ) : string | boolean
$code string language code
Результат string | boolean

instance() публичный статический Метод

Retrieve sole instance of the factory.
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.
Результат HTMLPurifier_LanguageFactory

loadLanguage() публичный Метод

Loads language into the cache, handles message file and fallbacks
public loadLanguage ( string $code )
$code string language code

setup() публичный Метод

Sets up the singleton, much like a constructor
public setup ( )

Описание свойств

$cache публичное свойство

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

$dir защищенное свойство

Cached copy of dirname(__FILE__), directory of current file without trailing slash.
protected $dir

$keys публичное свойство

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

$mergeable_keys_list защищенное свойство

Keys whose contents are a list and can be merged.
protected $mergeable_keys_list

$mergeable_keys_map защищенное свойство

Keys whose contents are a hash map and can be merged.
protected $mergeable_keys_map

$validator защищенное свойство

Instance to validate language codes.
protected $validator