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 Currency

A currency.

<?php

use ICanBoogie\CLDR\Currency;

$euro = new Currency($cldr, 'EUR');
# or
$euro = $cldr->currencies['EUR'];

echo $euro->code;        // EUR
echo $euro->digits;      // 2
echo $euro->rounding;    // 0
echo $euro->cash_digits;   //
ICanBoogie\CLDR\Currency uses ICanBoogie\Accessor\AccessorTrait (not available) ICanBoogie\CLDR\RepositoryPropertyTrait, ICanBoogie\CLDR\CodePropertyTrait
Namespace: ICanBoogie\CLDR
See: http://unicode.org/reports/tr35/tr35-numbers.html#Supplemental_Currency_Data
Located at Currency.php

Methods summary

public
# __construct( ICanBoogie\CLDR\Repository $repository, string $code )

Parameters

$repository
$code
Currency ISO code.
public
# __get( $property )

Inheritdoc

public ICanBoogie\CLDR\LocalizedCurrency
# localize( string $locale_code )

Localize the currency.

Localize the currency.

Parameters

$locale_code

Returns

ICanBoogie\CLDR\LocalizedCurrency

Methods used from ICanBoogie\CLDR\RepositoryPropertyTrait

get_repository()

Methods used from ICanBoogie\CLDR\CodePropertyTrait

__toString(), get_code()

Constants summary

string FRACTION_FALLBACK
# 'DEFAULT'

Properties summary

Magic properties

public read-only string $code

The ISO 4217 code for the currency.

public read-only integer $digits

The minimum and maximum number of decimal digits normally formatted.

public read-only integer $rounding

The rounding increment, in units of 10^-digits.

public read-only integer $cash_digits

The number of decimal digits to be used when formatting quantities used in cash transactions.

public read-only integer $cash_rounding

The cash rounding increment, in units of 10^cashDigits

Magic properties used from ICanBoogie\CLDR\RepositoryPropertyTrait

$repository

ICanBoogie/CLDR master API documentation generated by ApiGen