PHP Class HTMLPurifier_Language, yii

Afficher le fichier Open project: yiisoft/yii Class Usage Examples

Méthodes publiques

Свойство Type Description
$_loaded Has the language object been loaded yet?
$code ISO 639 language code of language. Prefers shortest possible version.
$error True if no message file was found for this language, so English is being used instead. Check this if you'd like to notify the user that they've used a non-supported language.
$errorNames Array of localizable error codes.
$fallback Fallback language code.
$messages Array of localizable messages.

Protected Properties

Свойство Type Description
$config
$context

Méthodes publiques

Méthode Description
__construct ( HTMLPurifier_Config $config, HTMLPurifier_Context $context )
formatMessage ( string $key, array $args = [] ) : string Formats a localised message with passed parameters
getErrorName ( integer $int ) : string Retrieves a localised error name.
getMessage ( string $key ) : string Retrieves a localised message.
listify ( array $array ) : string Converts an array list into a string readable representation
load ( ) Loads language object with necessary info from factory cache

Method Details

__construct() public méthode

public __construct ( HTMLPurifier_Config $config, HTMLPurifier_Context $context )
$config HTMLPurifier_Config
$context HTMLPurifier_Context

formatMessage() public méthode

Formats a localised message with passed parameters
public formatMessage ( string $key, array $args = [] ) : string
$key string string identifier of message
$args array Parameters to substitute in
Résultat string localised message

getErrorName() public méthode

Retrieves a localised error name.
public getErrorName ( integer $int ) : string
$int integer error number, corresponding to PHP's error reporting
Résultat string localised message

getMessage() public méthode

Retrieves a localised message.
public getMessage ( string $key ) : string
$key string string identifier of message
Résultat string localised message

listify() public méthode

Converts an array list into a string readable representation
public listify ( array $array ) : string
$array array
Résultat string

load() public méthode

Loads language object with necessary info from factory cache
public load ( )

Property Details

$_loaded public_oe property

Has the language object been loaded yet?
public $_loaded

$code public_oe property

ISO 639 language code of language. Prefers shortest possible version.
public $code

$config protected_oe property

protected $config

$context protected_oe property

protected $context

$error public_oe property

True if no message file was found for this language, so English is being used instead. Check this if you'd like to notify the user that they've used a non-supported language.
public $error

$errorNames public_oe property

Array of localizable error codes.
public $errorNames

$fallback public_oe property

Fallback language code.
public $fallback

$messages public_oe property

Array of localizable messages.
public $messages