[ Index ]
 

Code source de Symfony 1.0.0

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

title

Body

[fermer]

/lib/i18n/ -> sfNumberFormatInfo.class.php (sommaire)

sfNumberFormatInfo 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: $Id: sfNumberFormatInfo.class.php 2834 2006-11-27 14:09:05Z fabien $
Poids: 681 lignes (17 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

sfNumberFormatInfo:: (40 méthodes):
  __get()
  __set()
  __construct()
  setPattern()
  getPattern()
  getInvariantInfo()
  getInstance()
  getCurrencyInstance()
  getPercentageInstance()
  getScientificInstance()
  parsePattern()
  getPrePostfix()
  getDecimalDigits()
  setDecimalDigits()
  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: sfNumberFormatInfo  - X-Ref

sfNumberFormatInfo 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
sfNumberFormatInfo.

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

To create a sfNumberFormatInfo for a specific culture,
create a sfCultureInfo for that culture and retrieve the
sfCultureInfo->NumberFormat property. Or use
sfNumberFormatInfo::getInstance($culture).
To create a sfNumberFormatInfo 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 sfNumberFormatInfo 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
sfNumberFormatInfo::getInstance() to create an instance.

param: array ICU data for date time formatting.

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

param: int pattern type.

getPattern()   X-Ref
Pas de description

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

return: sfNumberFormatInfo default sfNumberFormatInfo.

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

param: sfCultureInfo the culture that gets the sfNumberFormat property.
param: int the number formatting type, it should be
return: sfNumberFormatInfo sfNumberFormatInfo for the specified culture.

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

param: sfCultureInfo the culture that gets the NumberFormat property.
return: sfNumberFormatInfo sfNumberFormatInfo for the specified culture.

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

param: sfCultureInfo the culture that gets the NumberFormat property.
return: sfNumberFormatInfo sfNumberFormatInfo for the specified culture.

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

param: sfCultureInfo the culture that gets the NumberFormat property.
return: sfNumberFormatInfo sfNumberFormatInfo for the specified culture.

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.

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 : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7