Class P4A_I18N_Numbers

Description

p4a internationalization class for numbers.

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


	
			
Variable Summary
Method Summary
 P4A_I18N_Numbers P4A_I18N_Numbers (array &$formats)
 mixed format (mixed $number, [array $format = NULL])
 mixed formatDecimal (mixed $number)
 mixed formatFloat (mixed $number)
 mixed formatInteger (mixed $number)
 array getFormat (string $format)
 array setFormat (string $format, array $value)
 array setLocalFormat (string $format, integer $decimals)
 mixed unformat (mixed $number, [string $format = NULL])
 mixed unformatDecimal (mixed $number)
 mixed unformatFloat (mixed $number)
 mixed unformatInteger (mixed $number)
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_Numbers (line 74)

Class constructor.

  • access: private
P4A_I18N_Numbers P4A_I18N_Numbers (array &$formats)
  • array &$formats: All formats in array.
format (line 92)

Format a number.

Default format is float.

mixed format (mixed $number, [array $format = NULL])
  • mixed $number: the number
  • array $format: the format
formatDecimal (line 132)

Format a number as a decimal.

mixed formatDecimal (mixed $number)
  • mixed $number: the number
formatFloat (line 120)

Format a number as a float.

mixed formatFloat (mixed $number)
  • mixed $number: the number
formatInteger (line 108)

Format a number as an integer.

mixed formatInteger (mixed $number)
  • mixed $number: the number
getFormat (line 197)

Returns the format array for a given format name.

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

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 221)

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

  • access: public
array setLocalFormat (string $format, integer $decimals)
  • string $format: The format name
  • integer $decimals: The number of decimals
unformat (line 146)

Unformat a number.

Default format is float.

mixed unformat (mixed $number, [string $format = NULL])
  • mixed $number: the number
  • string $format: the format
unformatDecimal (line 186)

Unformat a number as a decimal.

mixed unformatDecimal (mixed $number)
  • mixed $number: the number
unformatFloat (line 174)

Unformat a number as a float.

mixed unformatFloat (mixed $number)
  • mixed $number: the number
unformatInteger (line 162)

Unformat a number as an integer.

mixed unformatInteger (mixed $number)
  • mixed $number: the number

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