Class HTMLPurifier_Language

Description

Represents a language and defines localizable string formatting and other functions, as well as the localized messages for HTML Purifier.

Represents a language and defines localizable string formatting and other functions, as well as the localized messages for HTML Purifier.

Located in /library/HTMLPurifier/Language.php (line 7)


	
			
Direct descendents
Class Description
HTMLPurifier_Language_en_x_test Represents a language and defines localizable string formatting and other functions, as well as the localized messages for HTML Purifier.
Variable Summary
mixed $code
mixed $config
mixed $context
mixed $error
mixed $errorNames
mixed $fallback
mixed $messages
mixed $_loaded
Method Summary
HTMLPurifier_Language __construct ( $config,  $context)
string formatMessage ($key $key, [$args $args = array()])
string getErrorName ($int $int)
string getMessage ($key $key)
void listify ( $array)
void load ()
Variables
mixed $code = 'en' (line 13)

ISO 639 language code of language.

ISO 639 language code of language. Prefers shortest possible version

  • access: public
mixed $config (line 46)

Instances of HTMLPurifier_Config and HTMLPurifier_Context

Instances of HTMLPurifier_Config and HTMLPurifier_Context

  • access: protected
mixed $context (line 46)
  • access: protected
mixed $error = false (line 35)

True if no message file was found for this language, so English is being used instead. user that they've used a non-supported language.

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.

  • access: public
mixed $errorNames = array() (line 28)

Array of localizable error codes

Array of localizable error codes

  • access: public
mixed $fallback = false (line 18)

Fallback language code

Fallback language code

  • access: public
mixed $messages = array() (line 23)

Array of localizable messages

Array of localizable messages

  • access: public
mixed $_loaded = false (line 41)

Has the language object been loaded yet?

Has the language object been loaded yet?

  • todo: Make it private, fix usage in HTMLPurifier_LanguageTest
  • access: public
Methods
Constructor __construct (line 48)
  • access: public
HTMLPurifier_Language __construct ( $config,  $context)
  • $config
  • $context
formatMessage (line 117)

Formats a localised message with passed parameters

Formats a localised message with passed parameters

  • return: localised message
  • todo: Implement conditionals? Right now, some messages make reference to line numbers, but those aren't always available
  • access: public
string formatMessage ($key $key, [$args $args = array()])
  • $key $key: string identifier of message
  • $args $args: Parameters to substitute in
getErrorName (line 84)

Retrieves a localised error name.

Retrieves a localised error name.

  • return: localised message
  • access: public
string getErrorName ($int $int)
  • $int $int: integer error number, corresponding to PHP's error reporting
getMessage (line 72)

Retrieves a localised message.

Retrieves a localised message.

  • return: localised message
  • access: public
string getMessage ($key $key)
  • $key $key: string identifier of message
listify (line 93)

Converts an array list into a string readable representation

Converts an array list into a string readable representation

  • access: public
void listify ( $array)
  • $array
load (line 57)

Loads language object with necessary info from factory cache

Loads language object with necessary info from factory cache

  • access: public
void load ()

Documentation generated on Thu, 19 Jun 2008 18:49:40 -0400 by phpDocumentor 1.4.2