ICanBoogie
  • Documentation
  • API Reference
  • CLDR master
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 Repository

Representation of a CLDR.

<?php

namespace ICanBoogie\CLDR;

$repository = new Repository($provider);

var_dump($repository->locales['fr']);
var_dump($repository->territories['FR']);
ICanBoogie\CLDR\Repository uses ICanBoogie\Accessor\AccessorTrait (not available)
Namespace: ICanBoogie\CLDR
See: http://www.unicode.org/repos/cldr-aux/json/24/
Located at Repository.php

Methods summary

protected get_provider( void ) : ICanBoogie\CLDR\Provider

Returns

ICanBoogie\CLDR\Provider
protected lazy_get_locales( void ) : ICanBoogie\CLDR\LocaleCollection

Returns

ICanBoogie\CLDR\LocaleCollection
protected lazy_get_supplemental( void ) : ICanBoogie\CLDR\Supplemental

Returns

ICanBoogie\CLDR\Supplemental
protected lazy_get_territories( void ) : ICanBoogie\CLDR\TerritoryCollection

Returns

ICanBoogie\CLDR\TerritoryCollection
protected lazy_get_currencies( void ) : ICanBoogie\CLDR\CurrencyCollection

Returns

ICanBoogie\CLDR\CurrencyCollection
protected lazy_get_number_formatter( void ) : ICanBoogie\CLDR\NumberFormatter

Returns

ICanBoogie\CLDR\NumberFormatter
protected lazy_get_list_formatter( void ) : ICanBoogie\CLDR\ListFormatter

Returns

ICanBoogie\CLDR\ListFormatter
protected lazy_get_plurals( void ) : ICanBoogie\CLDR\Plurals

Returns

ICanBoogie\CLDR\Plurals
public __construct( ICanBoogie\CLDR\Provider $provider )

Initializes the $provider property.

Initializes the $provider property.

Parameters

$provider
public fetch( string $path ) : array

Fetches the data available at the specified path.

Fetches the data available at the specified path.

Note: The method is forwarded to Provider::provide.

Parameters

$path

Returns

array
public format_number( mixed $number, string $pattern, array $symbols = [] ) : string

Format a number with the specified pattern.

Format a number with the specified pattern.

Parameters

$number
The number to be formatted.
$pattern
The pattern used to format the number.
$symbols
Symbols.

Returns

string

See

NumberFormatter::format()
public format_list( array $list, array $list_patterns ) : string

Formats a variable-length lists of things.

Formats a variable-length lists of things.

Parameters

$list
The list to format.
$list_patterns
A list patterns.

Returns

string

See

ListFormatter::format()

Properties summary

Magic properties

public read-only $provider : ICanBoogie\CLDR\Provider
public read-only $locales : ICanBoogie\CLDR\LocaleCollection
public read-only $supplemental : ICanBoogie\CLDR\Supplemental
public read-only $territories : ICanBoogie\CLDR\TerritoryCollection
public read-only $currencies : ICanBoogie\CLDR\CurrencyCollection
public read-only $number_formatter : ICanBoogie\CLDR\NumberFormatter
public read-only $list_formatter : ICanBoogie\CLDR\ListFormatter
public read-only $plurals : ICanBoogie\CLDR\Plurals
CLDR master – Check on GitHub – API documentation generated by ApiGen