symfony API

sfNumberFormatInfo Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.0 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

Method Details

  • (sfNumberFormatInfo) getCurrencyInstance ()

    Returns the currency format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (string) getCurrencySymbol ()

    Gets the string to use as the currency symbol.

    returns currency symbol.

  • (int) getDecimalDigits ()

    Indicates the number of decimal places.

    returns number of decimal places.

  • (string) getDecimalSeparator ()

    Gets the string to use as the decimal separator.

    returns decimal separator.

  • (string) getGroupSeparator ()

    Gets the string that separates groups of digits to the left

    of the decimal in currency values.

    returns currency group separator.

  • (array) getGroupSizes ()

    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 (, )

    Returns the sfNumberFormatInfo associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (sfNumberFormatInfo) getInvariantInfo ()

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

    returns default sfNumberFormatInfo.

  • (string) getNaNSymbol ()

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

    returns NaN symbol.

  • (string) getNegativeInfinitySymbol ()

    Gets the string that represents negative infinity.

    returns negative infinity.

  • (arary) getNegativePattern ()

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

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

    returns negative sign.

  • getPattern ()

  • (sfNumberFormatInfo) getPercentageInstance ()

    Returns the percentage format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (string) getPercentSymbol ()

    Gets the string to use as the percent symbol.

    returns percent symbol.

  • (string) getPerMilleSymbol ()

    Gets the string to use as the per mille symbol.

    returns percent symbol.

  • (string) getPositiveInfinitySymbol ()

    Gets the string that represents positive infinity.

    returns positive infinity.

  • (arary) getPositivePattern ()

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

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

    returns positive sign.

  • (array) getPrePostfix ()

    Gets the prefix and postfix of a pattern.

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

  • (sfNumberFormatInfo) getScientificInstance ()

    Returns the scientific format info associated with the specified culture.

    returns sfNumberFormatInfo for the specified culture.

  • (array) parsePattern ()

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

    returns list of pattern properties.

  • setCurrencySymbol ()

    Sets the string to use as the currency symbol.

  • setDecimalDigits ()

    Sets the number of decimal places.

  • setDecimalSeparator ()

    Sets the string to use as the decimal separator.

  • setGroupSeparator ()

    Sets the string to use as the group separator.

  • setGroupSizes ()

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

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

  • setNegativeInfinitySymbol ()

    Sets the string that represents negative infinity.

  • setNegativePattern ()

    Sets the format pattern for negative values.

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

  • setNegativeSign ()

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

  • setPattern ()

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

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

  • setPercentSymbol ()

    Sets the string to use as the percent symbol.

  • setPerMilleSymbol ()

    Sets the string to use as the per mille symbol.

  • setPositiveInfinitySymbol ()

    Sets the string that represents positive infinity.

  • setPositivePattern ()

    Sets the format pattern for positive values.

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

  • setPositiveSign ()

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

  • __construct ()

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

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

    as an attribute/property to retrieve the value.

  • __set ()

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

    as an attribute/property to set the value.