ICanBoogie/CLDR master
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • CLDR
      • Plurals
      • Units

Classes

  • AbstractCollection
  • AbstractSectionCollection
  • Calendar
  • CalendarCollection
  • ContextTransforms
  • Currency
  • CurrencyCollection
  • CurrencyFormatter
  • DateFormatter
  • DateTimeAccessor
  • DateTimeFormatter
  • FileProvider
  • ListFormatter
  • Locale
  • LocaleCollection
  • LocalizedCurrency
  • LocalizedDateTime
  • LocalizedListFormatter
  • LocalizedLocale
  • LocalizedNumberFormatter
  • LocalizedObject
  • LocalizedObjectWithFormatter
  • LocalizedTerritory
  • Number
  • NumberFormatter
  • NumberPattern
  • NumberPatternParser
  • Numbers
  • Plurals
  • ProviderCollection
  • RedisProvider
  • Repository
  • RunTimeProvider
  • Supplemental
  • Territory
  • TerritoryCollection
  • TimeFormatter
  • Units
  • WebProvider

Interfaces

  • Exception
  • Formatter
  • LocalizeAwareInterface
  • Provider

Traits

  • CodePropertyTrait
  • CollectionTrait
  • LocalePropertyTrait
  • LocalizeTrait
  • ProviderStorageBinding
  • RepositoryPropertyTrait

Exceptions

  • ResourceNotFound
  • TerritoryNotDefined

Class NumberPattern

Representation of a number pattern.

ICanBoogie\CLDR\NumberPattern uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\CLDR
Located at NumberPattern.php

Methods summary

public static ICanBoogie\CLDR\NumberPattern
# from( string $pattern )

Parameters

$pattern

Returns

ICanBoogie\CLDR\NumberPattern
protected array
# get_format( )

Returns

array
public
# __get( $property )

Inheritdoc

public string
# __toString( )

Returns

string
public array
# parse_number( number $number )

Parse a number according to the pattern and return its integer and decimal parts.

Parse a number according to the pattern and return its integer and decimal parts.

Parameters

$number

Returns

array
An array made with the integer and decimal parts of the number.
public string
# format_integer_with_group( integer $integer, string $group_symbol )

Formats integer according to group pattern.

Formats integer according to group pattern.

Parameters

$integer
$group_symbol

Returns

string
public string
# format_integer_with_decimal( string|integer $integer, string $decimal, string $decimal_symbol )

Formats an integer with a decimal.

Formats an integer with a decimal.

Parameters

$integer

An integer, or a formatted integer as returned by ICanBoogie\CLDR\NumberPattern::format_integer_with_group().

$decimal
$decimal_symbol

Returns

string

Properties summary

Magic properties

public read-only array $format
public read-only string $positive_prefix

Prefix to positive number.

public read-only string $positive_suffix

Suffix to positive number.

public read-only string $negative_prefix

Prefix to negative number.

public read-only string $negative_suffix

Suffix to negative number.

public read-only integer $multiplier

100 for percent, 1000 for per mille.

public read-only integer $decimal_digits

The number of required digits after decimal point. The string is padded with zeros if there is not enough digits. -1 means the decimal point should be dropped.

public read-only integer $max_decimal_digits

The maximum number of digits after decimal point. Additional digits will be truncated.

public read-only integer $integer_digits

The number of required digits before decimal point. The string is padded with zeros if there is not enough digits.

public read-only integer $group_size1

The primary grouping size. 0 means no grouping.

public read-only integer $group_size2

The secondary grouping size. 0 means no secondary grouping

ICanBoogie/CLDR master API documentation generated by ApiGen