PHP 클래스 HTMLPurifier_LanguageFactory, yii

파일 보기 프로젝트 열기: yiisoft/yii 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

보호된 프로퍼티들

프로퍼티 타입 설명
$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