[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/I18N/core/ -> NumberFormatInfo.php (sommaire)

NumberFormatInfo class file. This program is free software; you can redistribute it and/or modify it under the terms of the BSD License.

Author: Wei Zhuo
Version: $Revision: 1.3 $ $Date: 2005/08/04 05:27:19 $
Poids: 651 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

NumberFormatInfo:: (42 méthodes):
  __get()
  __set()
  __construct()
  setPattern()
  getPattern()
  getInvariantInfo()
  getInstance()
  getCurrencyInstance()
  getPercentageInstance()
  getScientificInstance()
  parsePattern()
  getPrePostfix()
  getDecimalDigits()
  setDecimalDigits()
  getDigitSize()
  setDigitSize()
  getDecimalSeparator()
  setDecimalSeparator()
  getGroupSeparator()
  setGroupSeparator()
  getGroupSizes()
  setGroupSizes()
  getNegativePattern()
  setNegativePattern()
  getPositivePattern()
  setPositivePattern()
  getCurrencySymbol()
  setCurrencySymbol()
  getNegativeInfinitySymbol()
  setNegativeInfinitySymbol()
  getPositiveInfinitySymbol()
  setPositiveInfinitySymbol()
  getNegativeSign()
  setNegativeSign()
  getPositiveSign()
  setPositiveSign()
  getNaNSymbol()
  setNaNSymbol()
  getPercentSymbol()
  setPercentSymbol()
  getPerMilleSymbol()
  setPerMilleSymbol()


Classe: NumberFormatInfo  - X-Ref

NumberFormatInfo class

Defines how numeric values are formatted and displayed,
depending on the culture. Numeric values are formatted using
standard or custom patterns stored in the properties of a
NumberFormatInfo.

This class contains information, such as currency, decimal
separators, and other numeric symbols.

To create a NumberFormatInfo for a specific culture,
create a CultureInfo for that culture and retrieve the
CultureInfo->NumberFormat property. Or use
NumberFormatInfo::getInstance($culture).
To create a NumberFormatInfo for the invariant culture, use the
InvariantInfo::getInvariantInfo().


__get($name)   X-Ref
Allow functions that begins with 'set' to be called directly
as an attribute/property to retrieve the value.

return: mixed

__set($name, $value)   X-Ref
Allow functions that begins with 'set' to be called directly
as an attribute/property to set the value.


__construct($data=array()   X-Ref
Initializes a new writable instance of the NumberFormatInfo class
that is dependent on the ICU data for number, decimal, and currency
formatting information. <b>N.B.</b>You should not initialize this
class directly unless you know what you are doing. Please use use
NumberFormatInfo::getInstance() to create an instance.

param: array ICU data for date time formatting.

setPattern($type=NumberFormatInfo::DECIMAL)   X-Ref
Set the pattern for a specific number pattern. The validate patterns
NumberFormatInfo::DECIMAL, NumberFormatInfo::CURRENCY,
NumberFormatInfo::PERCENTAGE, or NumberFormatInfo::SCIENTIFIC

param: int pattern type.

getPattern()   X-Ref
Pas de description

getInvariantInfo($type=NumberFormatInfo::DECIMAL)   X-Ref
Gets the default NumberFormatInfo that is culture-independent
(invariant).

return: NumberFormatInfo default NumberFormatInfo.

getInstance($culture=null, $type=NumberFormatInfo::DECIMAL)   X-Ref
Returns the NumberFormatInfo associated with the specified culture.

param: CultureInfo the culture that gets the NumberFormat property.
param: int the number formatting type, it should be
return: NumberFormatInfo NumberFormatInfo for the specified

getCurrencyInstance($culture=null)   X-Ref
Returns the currency format info associated with the specified culture.

param: CultureInfo the culture that gets the NumberFormat property.
return: NumberFormatInfo NumberFormatInfo for the specified

getPercentageInstance($culture=null)   X-Ref
Returns the percentage format info associated with the specified culture.

param: CultureInfo the culture that gets the NumberFormat property.
return: NumberFormatInfo NumberFormatInfo for the specified

getScientificInstance($culture=null)   X-Ref
Returns the scientific format info associated with the specified culture.

param: CultureInfo the culture that gets the NumberFormat property.
return: NumberFormatInfo NumberFormatInfo for the specified

parsePattern($pattern)   X-Ref
Parse the given pattern and return a list of known properties.

param: string a number pattern.
return: array list of pattern properties.

getPrePostfix($pattern)   X-Ref
Get the prefix and postfix of a pattern.

param: string pattern
return: array of prefix and postfix, array(prefix,postfix).

getDecimalDigits()   X-Ref
Indicates the number of decimal places.

return: int number of decimal places.

setDecimalDigits($value)   X-Ref
Set the number of decimal places.

param: int number of decimal places.

getDigitSize()   X-Ref
Pas de description

setDigitSize($value)   X-Ref
Pas de description

getDecimalSeparator()   X-Ref
Gets the string to use as the decimal separator.

return: string decimal separator.

setDecimalSeparator($value)   X-Ref
Set the string to use as the decimal separator.

param: string the decimal point

getGroupSeparator()   X-Ref
Gets the string that separates groups of digits to the left
of the decimal in currency values.

param: parameter
return: string currency group separator.

setGroupSeparator($value)   X-Ref
Set the string to use as the group separator.

param: string the group separator.

getGroupSizes()   X-Ref
Gets the number of digits in each group to the left of the decimal
There can be two grouping sizes, this fucntion
returns <b>array(group1, group2)</b>, if there is only 1 grouping size,
group2 will be false.

return: array grouping size(s).

setGroupSizes($groupSize)   X-Ref
Set the number of digits in each group to the left of the decimal.
There can be two grouping sizes, the value should
be an <b>array(group1, group2)</b>, if there is only 1 grouping size,
group2 should be false.

param: array grouping size(s).

getNegativePattern()   X-Ref
Gets the format pattern for negative values.
The negative pattern is composed of a prefix, and postfix.
This function returns <b>array(prefix, postfix)</b>.

return: arary negative pattern.

setNegativePattern($pattern)   X-Ref
Set the format pattern for negative values.
The negative pattern is composed of a prefix, and postfix in the form
<b>array(prefix, postfix)</b>.

param: arary negative pattern.

getPositivePattern()   X-Ref
Gets the format pattern for positive values.
The positive pattern is composed of a prefix, and postfix.
This function returns <b>array(prefix, postfix)</b>.

return: arary positive pattern.

setPositivePattern($pattern)   X-Ref
Set the format pattern for positive values.
The positive pattern is composed of a prefix, and postfix in the form
<b>array(prefix, postfix)</b>.

param: arary positive pattern.

getCurrencySymbol($currency='USD')   X-Ref
Gets the string to use as the currency symbol.

return: string currency symbol.

setCurrencySymbol($symbol)   X-Ref
Set the string to use as the currency symbol.

param: string currency symbol.

getNegativeInfinitySymbol()   X-Ref
Gets the string that represents negative infinity.

return: string negative infinity.

setNegativeInfinitySymbol($value)   X-Ref
Set the string that represents negative infinity.

param: string negative infinity.

getPositiveInfinitySymbol()   X-Ref
Gets the string that represents positive infinity.

return: string positive infinity.

setPositiveInfinitySymbol($value)   X-Ref
Set the string that represents positive infinity.

param: string positive infinity.

getNegativeSign()   X-Ref
Gets the string that denotes that the associated number is negative.

return: string negative sign.

setNegativeSign($value)   X-Ref
Set the string that denotes that the associated number is negative.

param: string negative sign.

getPositiveSign()   X-Ref
Gets the string that denotes that the associated number is positive.

return: string positive sign.

setPositiveSign($value)   X-Ref
Set the string that denotes that the associated number is positive.

param: string positive sign.

getNaNSymbol()   X-Ref
Gets the string that represents the IEEE NaN (not a number) value.

return: string NaN symbol.

setNaNSymbol($value)   X-Ref
Set the string that represents the IEEE NaN (not a number) value.

param: string NaN symbol.

getPercentSymbol()   X-Ref
Gets the string to use as the percent symbol.

return: string percent symbol.

setPercentSymbol($value)   X-Ref
Set the string to use as the percent symbol.

param: string percent symbol.

getPerMilleSymbol()   X-Ref
Gets the string to use as the per mille symbol.

return: string percent symbol.

setPerMilleSymbol($value)   X-Ref
Set the string to use as the per mille symbol.

param: string percent symbol.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7