Class P4A_I18N_Currency

Description

p4a internationalization class for currency.

Located in /p4a/i18n/i18n_currency.php (line 46)


	
			
Variable Summary
Method Summary
 P4A_I18N_Currency P4A_I18N_Currency (array &$formats)
 mixed format (mixed $value, [array $format = NULL])
 mixed formatInternational (mixed $value)
 mixed formatLocal (mixed $value)
 array getFormat (string $format)
 array setFormat (string $format, array $value)
 array setLocalFormat (string $format, integer $format_string, integer $decimals)
 mixed unformat (mixed $value, [array $format = NULL])
 mixed unformatInternational (mixed $value)
 mixed unformatLocal (mixed $value)
Variables
string $decimal_separator = NULL (line 60)

The decimal separator.

  • access: private
array $formats = NULL (line 53)

Here we store all formats.

  • access: private
string $thousand_separator = NULL (line 67)

The thousand separator.

  • access: private
Methods
Constructor P4A_I18N_Currency (line 74)

Class constructor.

  • access: private
P4A_I18N_Currency P4A_I18N_Currency (array &$formats)
  • array &$formats: All formats in array.
format (line 128)

Format a currency.

Default format is local.

mixed format (mixed $value, [array $format = NULL])
  • mixed $value: the value
  • array $format: the format
formatInternational (line 157)

Format a value in international format.

mixed formatInternational (mixed $value)
  • mixed $value: the value
formatLocal (line 145)

Format a value in local format.

mixed formatLocal (mixed $value)
  • mixed $value: the value
getFormat (line 89)

Returns the format array for a given format name.

  • access: public
array getFormat (string $format)
  • string $format: The format name
setFormat (line 101)

Sets the format array for a given format name.

  • access: public
array setFormat (string $format, array $value)
  • string $format: The format name
  • array $value: The format array
setLocalFormat (line 114)

Sets the format (only decimals number) for a given format name, according to the current locale.

  • access: public
array setLocalFormat (string $format, integer $format_string, integer $decimals)
  • string $format: The format name
  • integer $format_string: The formatting string. Eg: "% Eur"
  • integer $decimals: The number of decimals
unformat (line 171)

Unformat a currency.

Default format is local.

mixed unformat (mixed $value, [array $format = NULL])
  • mixed $value: the value
  • array $format: the format
unformatInternational (line 199)

Unformat a value in international format.

mixed unformatInternational (mixed $value)
  • mixed $value: the value
unformatLocal (line 187)

Unformat a value in local format.

mixed unformatLocal (mixed $value)
  • mixed $value: the value

Documentation generated on Fri, 26 May 2006 12:43:15 +0200 by phpDocumentor 1.3.0RC5