symfony API

sfNumberFormatInfo Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfNumberFormatInfo class

Method Summary

  • sfNumberFormatInfo getCurrencyInstance($culture)
    Returns the currency format info associated with the specified culture.
  • string getCurrencySymbol()
    Gets the string to use as the currency symbol.
  • int getDecimalDigits()
    Indicates the number of decimal places.
  • string getDecimalSeparator()
    Gets the string to use as the decimal separator.
  • int getDigitSize()
    Indicates the digit size.
  • string getGroupSeparator()
    Gets the string that separates groups of digits to the left
  • array getGroupSizes()
    Gets the number of digits in each group to the left of the decimal
  • sfNumberFormatInfo getInstance($culture, $type)
    Returns the sfNumberFormatInfo associated with the specified culture.
  • sfNumberFormatInfo getInvariantInfo()
    Gets the default sfNumberFormatInfo that is culture-independent (invariant).
  • string getNaNSymbol()
    Gets the string that represents the IEEE NaN (not a number) value.
  • string getNegativeInfinitySymbol()
    Gets the string that represents negative infinity.
  • arary getNegativePattern()
    Gets the format pattern for negative values.
  • string getNegativeSign()
    Gets the string that denotes that the associated number is negative.
  • getPattern()
  • sfNumberFormatInfo getPercentageInstance($culture)
    Returns the percentage format info associated with the specified culture.
  • string getPercentSymbol()
    Gets the string to use as the percent symbol.
  • string getPerMilleSymbol()
    Gets the string to use as the per mille symbol.
  • string getPositiveInfinitySymbol()
    Gets the string that represents positive infinity.
  • arary getPositivePattern()
    Gets the format pattern for positive values.
  • string getPositiveSign()
    Gets the string that denotes that the associated number is positive.
  • array getPrePostfix($pattern)
    Gets the prefix and postfix of a pattern.
  • sfNumberFormatInfo getScientificInstance($culture)
    Returns the scientific format info associated with the specified culture.
  • array parsePattern($pattern)
    Parses the given pattern and return a list of known properties.
  • setCurrencySymbol($symbol)
    Sets the string to use as the currency symbol.
  • setDecimalDigits($value)
    Sets the number of decimal places.
  • setDecimalSeparator($value)
    Sets the string to use as the decimal separator.
  • setDigitSize($value)
    Sets the digit size.
  • setGroupSeparator($value)
    Sets the string to use as the group separator.
  • setGroupSizes($groupSize)
    Sets the number of digits in each group to the left of the decimal.
  • setNaNSymbol($value)
    Sets the string that represents the IEEE NaN (not a number) value.
  • setNegativeInfinitySymbol($value)
    Sets the string that represents negative infinity.
  • setNegativePattern($pattern)
    Sets the format pattern for negative values.
  • setNegativeSign($value)
    Sets the string that denotes that the associated number is negative.
  • setPattern($type)
    Sets the pattern for a specific number pattern. The validate patterns
  • setPercentSymbol($value)
    Sets the string to use as the percent symbol.
  • setPerMilleSymbol($value)
    Sets the string to use as the per mille symbol.
  • setPositiveInfinitySymbol($value)
    Sets the string that represents positive infinity.
  • setPositivePattern($pattern)
    Sets the format pattern for positive values.
  • setPositiveSign($value)
    Sets the string that denotes that the associated number is positive.
  • __construct($data, $type)
    Initializes a new writable instance of the sfNumberFormatInfo class
  • mixed __get()
    Allows functions that begins with 'set' to be called directly
  • __set()
    Allows functions that begins with 'set' to be called directly

Method Details

  • (sfNumberFormatInfo) getCurrencyInstance ($culture) Browse code

    $culture the culture that gets the NumberFormat property.

    Returns the currency format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (string) getCurrencySymbol () Browse code

    Gets the string to use as the currency symbol.

    returns $currency currency symbol.

  • (int) getDecimalDigits () Browse code

    Indicates the number of decimal places.

    returns number of decimal places.

  • (string) getDecimalSeparator () Browse code

    Gets the string to use as the decimal separator.

    returns decimal separator.

  • (int) getDigitSize () Browse code

    Indicates the digit size.

    returns digit size.

  • (string) getGroupSeparator () Browse code

    Gets the string that separates groups of digits to the left

    of the decimal in currency values.

    returns currency group separator.

  • (array) getGroupSizes () Browse code

    Gets the number of digits in each group to the left of the decimal

    There can be two grouping sizes, this fucntion
    returns array(group1, group2), if there is only 1 grouping size,
    group2 will be false.

    returns grouping size(s).

  • (sfNumberFormatInfo) getInstance ($culture, $type) Browse code

    $culture the culture that gets the sfNumberFormat property.
    $type the number formatting type, it should be sfNumberFormatInfo::DECIMAL, sfNumberFormatInfo::CURRENCY, sfNumberFormatInfo::PERCENTAGE, or sfNumberFormatInfo::SCIENTIFIC

    Returns the sfNumberFormatInfo associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (sfNumberFormatInfo) getInvariantInfo () Browse code

    Gets the default sfNumberFormatInfo that is culture-independent (invariant).

    returns default sfNumberFormatInfo.

  • (string) getNaNSymbol () Browse code

    Gets the string that represents the IEEE NaN (not a number) value.

    returns NaN symbol.

  • (string) getNegativeInfinitySymbol () Browse code

    Gets the string that represents negative infinity.

    returns negative infinity.

  • (arary) getNegativePattern () Browse code

    Gets the format pattern for negative values.

    The negative pattern is composed of a prefix, and postfix.
    This function returns array(prefix, postfix).

    returns negative pattern.

  • (string) getNegativeSign () Browse code

    Gets the string that denotes that the associated number is negative.

    returns negative sign.

  • getPattern () Browse code

  • (sfNumberFormatInfo) getPercentageInstance ($culture) Browse code

    $culture the culture that gets the NumberFormat property.

    Returns the percentage format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (string) getPercentSymbol () Browse code

    Gets the string to use as the percent symbol.

    returns percent symbol.

  • (string) getPerMilleSymbol () Browse code

    Gets the string to use as the per mille symbol.

    returns percent symbol.

  • (string) getPositiveInfinitySymbol () Browse code

    Gets the string that represents positive infinity.

    returns positive infinity.

  • (arary) getPositivePattern () Browse code

    Gets the format pattern for positive values.

    The positive pattern is composed of a prefix, and postfix.
    This function returns array(prefix, postfix).

    returns positive pattern.

  • (string) getPositiveSign () Browse code

    Gets the string that denotes that the associated number is positive.

    returns positive sign.

  • (array) getPrePostfix ($pattern) Browse code

    $pattern pattern

    Gets the prefix and postfix of a pattern.

    returns of prefix and postfix, array(prefix,postfix).

  • (sfNumberFormatInfo) getScientificInstance ($culture) Browse code

    $culture the culture that gets the NumberFormat property.

    Returns the scientific format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (array) parsePattern ($pattern) Browse code

    $pattern a number pattern.

    Parses the given pattern and return a list of known properties.

    returns list of pattern properties.

  • setCurrencySymbol ($symbol) Browse code

    $symbol currency symbol.

    Sets the string to use as the currency symbol.

  • setDecimalDigits ($value) Browse code

    $value number of decimal places.

    Sets the number of decimal places.

  • setDecimalSeparator ($value) Browse code

    $value the decimal point

    Sets the string to use as the decimal separator.

  • setDigitSize ($value) Browse code

    $value digit size.

    Sets the digit size.

  • setGroupSeparator ($value) Browse code

    $value the group separator.

    Sets the string to use as the group separator.

  • setGroupSizes ($groupSize) Browse code

    $groupSize grouping size(s).

    Sets the number of digits in each group to the left of the decimal.

    There can be two grouping sizes, the value should
    be an array(group1, group2), if there is only 1 grouping size,
    group2 should be false.

  • setNaNSymbol ($value) Browse code

    $value NaN symbol.

    Sets the string that represents the IEEE NaN (not a number) value.

  • setNegativeInfinitySymbol ($value) Browse code

    $value negative infinity.

    Sets the string that represents negative infinity.

  • setNegativePattern ($pattern) Browse code

    $pattern negative pattern.

    Sets the format pattern for negative values.

    The negative pattern is composed of a prefix, and postfix in the form
    array(prefix, postfix).

  • setNegativeSign ($value) Browse code

    $value negative sign.

    Sets the string that denotes that the associated number is negative.

  • setPattern ($type) Browse code

    $type pattern type.

    Sets the pattern for a specific number pattern. The validate patterns

    sfNumberFormatInfo::DECIMAL, sfNumberFormatInfo::CURRENCY,
    sfNumberFormatInfo::PERCENTAGE, or sfNumberFormatInfo::SCIENTIFIC

  • setPercentSymbol ($value) Browse code

    $value percent symbol.

    Sets the string to use as the percent symbol.

  • setPerMilleSymbol ($value) Browse code

    $value percent symbol.

    Sets the string to use as the per mille symbol.

  • setPositiveInfinitySymbol ($value) Browse code

    $value positive infinity.

    Sets the string that represents positive infinity.

  • setPositivePattern ($pattern) Browse code

    $pattern positive pattern.

    Sets the format pattern for positive values.

    The positive pattern is composed of a prefix, and postfix in the form
    array(prefix, postfix).

  • setPositiveSign ($value) Browse code

    $value positive sign.

    Sets the string that denotes that the associated number is positive.

  • __construct ($data, $type) Browse code

    $data ICU data for date time formatting.
    $type The sfNumberFormatInfo type

    Initializes a new writable instance of the sfNumberFormatInfo class

    that is dependent on the ICU data for number, decimal, and currency
    formatting information. N.B.You should not initialize this
    class directly unless you know what you are doing. Please use use
    sfNumberFormatInfo::getInstance() to create an instance.

  • (mixed) __get () Browse code

    Allows functions that begins with 'set' to be called directly

    as an attribute/property to retrieve the value.

  • __set () Browse code

    Allows functions that begins with 'set' to be called directly

    as an attribute/property to set the value.