You are here

function IntegerFormatter::cloneNumberPatternSymbols in Currency 7.2

Clones this formatter's NumberPatternSymbol objects.

Return value

array An array identical to $this->symbols.

2 calls to IntegerFormatter::cloneNumberPatternSymbols()
IntegerFormatter::format in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php
Formats a number.
IntegerFormatter::__clone in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php
Implements __clone().
1 method overrides IntegerFormatter::cloneNumberPatternSymbols()
DecimalFormatter::cloneNumberPatternSymbols in currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/DecimalFormatter.php
Clones this formatter's NumberPatternSymbol objects.

File

currency/vendor/bartfeenstra/cldr/src/BartFeenstra/CLDR/IntegerFormatter.php, line 455
Contains class \BartFeenstra\CLDR\IntegerFormatter.

Class

IntegerFormatter
Formats an integer according CLDR number pattern guidelines.

Namespace

BartFeenstra\CLDR

Code

function cloneNumberPatternSymbols() {
  $clone = array(
    self::POSITIVE => array(),
    self::NEGATIVE => array(),
  );
  foreach ($this->symbols as $sign => $sign_symbols) {
    foreach ($sign_symbols as $symbol) {
      $clone[$sign][] = clone $symbol;
    }
  }
  return $clone;
}