## P4A_I18N_Numbers

Description

p4a internationalization class for numbers.

- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>
- author: Andrea Giardina <andrea.giardina@crealabs.it>

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

Variable Summary
string $decimal_separator
array $formats
string $thousand_separator
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.

- see: P4A_Number::format()
- access: public

mixed format (mixed $number, [array $format = NULL])

- mixed $number: the number
- array $format: the format

formatDecimal (line 132)

Format a number as a decimal.

- see: P4A_I18N_Numbers::format()
- access: public

mixed formatDecimal (mixed $number)

- mixed $number: the number

formatFloat (line 120)

Format a number as a float.

- see: P4A_I18N_Numbers::format()
- access: public

mixed formatFloat (mixed $number)

- mixed $number: the number

formatInteger (line 108)

Format a number as an integer.

- see: P4A_I18N_Numbers::format()
- access: public

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.

- see: P4A_Number::unformat()
- access: public

mixed unformat (mixed $number, [string $format = NULL])

- mixed $number: the number
- string $format: the format

unformatDecimal (line 186)

Unformat a number as a decimal.

- see: P4A_I18N_Numbers::unformat()
- access: public

mixed unformatDecimal (mixed $number)

- mixed $number: the number

unformatFloat (line 174)

Unformat a number as a float.

- see: P4A_I18N_Numbers::unformat()
- access: public

mixed unformatFloat (mixed $number)

- mixed $number: the number

unformatInteger (line 162)

Unformat a number as an integer.

- see: P4A_I18N_Numbers::unformat()
- access: public

mixed unformatInteger (mixed $number)

- mixed $number: the number

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