From 4f35efa0bad4ae6489b63f3eebafe6542d654094 Mon Sep 17 00:00:00 2001 From: RedMatrix Date: Wed, 31 Dec 2014 10:43:19 +1100 Subject: Revert "Language names via intl library." --- library/intl/src/NumberFormat/NumberFormat.php | 269 --------------------- .../src/NumberFormat/NumberFormatInterface.php | 185 -------------- .../src/NumberFormat/NumberFormatRepository.php | 87 ------- .../NumberFormatRepositoryInterface.php | 19 -- 4 files changed, 560 deletions(-) delete mode 100644 library/intl/src/NumberFormat/NumberFormat.php delete mode 100644 library/intl/src/NumberFormat/NumberFormatInterface.php delete mode 100644 library/intl/src/NumberFormat/NumberFormatRepository.php delete mode 100644 library/intl/src/NumberFormat/NumberFormatRepositoryInterface.php (limited to 'library/intl/src/NumberFormat') diff --git a/library/intl/src/NumberFormat/NumberFormat.php b/library/intl/src/NumberFormat/NumberFormat.php deleted file mode 100644 index 0c512b7ab..000000000 --- a/library/intl/src/NumberFormat/NumberFormat.php +++ /dev/null @@ -1,269 +0,0 @@ -locale; - } - - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->locale = $locale; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getNumberingSystem() - { - return $this->numberingSystem; - } - - /** - * {@inheritdoc} - */ - public function setNumberingSystem($numberingSystem) - { - $this->numberingSystem = $numberingSystem; - } - - /** - * {@inheritdoc} - */ - public function getDecimalSeparator() - { - return $this->decimalSeparator; - } - - /** - * {@inheritdoc} - */ - public function setDecimalSeparator($decimalSeparator) - { - $this->decimalSeparator = $decimalSeparator; - } - - /** - * {@inheritdoc} - */ - public function getGroupingSeparator() - { - return $this->groupingSeparator; - } - - /** - * {@inheritdoc} - */ - public function setGroupingSeparator($groupingSeparator) - { - $this->groupingSeparator = $groupingSeparator; - } - - /** - * {@inheritdoc} - */ - public function getPlusSign() - { - return $this->plusSign; - } - - /** - * {@inheritdoc} - */ - public function setPlusSign($plusSign) - { - $this->plusSign = $plusSign; - } - - /** - * {@inheritdoc} - */ - public function getMinusSign() - { - return $this->minusSign; - } - - /** - * {@inheritdoc} - */ - public function setMinusSign($minusSign) - { - $this->minusSign = $minusSign; - } - - /** - * {@inheritdoc} - */ - public function getPercentSign() - { - return $this->percentSign; - } - - /** - * {@inheritdoc} - */ - public function setPercentSign($percentSign) - { - $this->percentSign = $percentSign; - } - - /** - * {@inheritdoc} - */ - public function getDecimalPattern() - { - return $this->decimalPattern; - } - - /** - * {@inheritdoc} - */ - public function setDecimalPattern($decimalPattern) - { - $this->decimalPattern = $decimalPattern; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getPercentPattern() - { - return $this->percentPattern; - } - - /** - * {@inheritdoc} - */ - public function setPercentPattern($percentPattern) - { - $this->percentPattern = $percentPattern; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getCurrencyPattern() - { - return $this->currencyPattern; - } - - /** - * {@inheritdoc} - */ - public function setCurrencyPattern($currencyPattern) - { - $this->currencyPattern = $currencyPattern; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getAccountingCurrencyPattern() - { - return $this->accountingCurrencyPattern; - } - - /** - * {@inheritdoc} - */ - public function setAccountingCurrencyPattern($accountingCurrencyPattern) - { - $this->accountingCurrencyPattern = $accountingCurrencyPattern; - - return $this; - } -} diff --git a/library/intl/src/NumberFormat/NumberFormatInterface.php b/library/intl/src/NumberFormat/NumberFormatInterface.php deleted file mode 100644 index fa382df70..000000000 --- a/library/intl/src/NumberFormat/NumberFormatInterface.php +++ /dev/null @@ -1,185 +0,0 @@ -definitionPath = $definitionPath ? $definitionPath : __DIR__ . '/../../resources/number_format/'; - } - - /** - * {@inheritdoc} - */ - public function get($locale, $fallbackLocale = null) - { - $locale = $this->resolveLocale($locale, $fallbackLocale); - if (!isset($this->definitions[$locale])) { - $filename = $this->definitionPath . $locale . '.json'; - $this->definitions[$locale] = json_decode(file_get_contents($filename), true); - } - - return $this->createNumberFormatFromDefinition($this->definitions[$locale], $locale); - } - - /** - * Creates a number format object from the provided definition. - * - * @param array $definition The number format definition. - * @param string $locale The locale of the number format definition. - * - * @return NumberFormat - */ - protected function createNumberFormatFromDefinition(array $definition, $locale) - { - if (!isset($definition['decimal_separator'])) { - $definition['decimal_separator'] = '.'; - } - if (!isset($definition['grouping_separator'])) { - $definition['grouping_separator'] = ','; - } - if (!isset($definition['plus_sign'])) { - $definition['plus_sign'] = '+'; - } - if (!isset($definition['minus_sign'])) { - $definition['minus_sign'] = '-'; - } - if (!isset($definition['percent_sign'])) { - $definition['percent_sign'] = '%'; - } - - $numberFormat = new NumberFormat(); - $numberFormat->setLocale($locale); - $numberFormat->setNumberingSystem($definition['numbering_system']); - $numberFormat->setDecimalSeparator($definition['decimal_separator']); - $numberFormat->setGroupingSeparator($definition['grouping_separator']); - $numberFormat->setPlusSign($definition['plus_sign']); - $numberFormat->setMinusSign($definition['minus_sign']); - $numberFormat->setPercentSign($definition['percent_sign']); - $numberFormat->setDecimalPattern($definition['decimal_pattern']); - $numberFormat->setPercentPattern($definition['percent_pattern']); - $numberFormat->setCurrencyPattern($definition['currency_pattern']); - $numberFormat->setAccountingCurrencyPattern($definition['accounting_currency_pattern']); - - return $numberFormat; - } -} diff --git a/library/intl/src/NumberFormat/NumberFormatRepositoryInterface.php b/library/intl/src/NumberFormat/NumberFormatRepositoryInterface.php deleted file mode 100644 index ff162b522..000000000 --- a/library/intl/src/NumberFormat/NumberFormatRepositoryInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -