PHP Class HTMLPurifier_Language, yii

Mostrar archivo Open project: yiisoft/yii Class Usage Examples

Public Properties

Property 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

Property Type Description
$config
$context

Public Methods

Method 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 method

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

formatMessage() public method

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
return string localised message

getErrorName() public method

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

getMessage() public method

Retrieves a localised message.
public getMessage ( string $key ) : string
$key string string identifier of message
return string localised message

listify() public method

Converts an array list into a string readable representation
public listify ( array $array ) : string
$array array
return string

load() public method

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