commerce-8.x-2.8/modules/price/src/NumberFormatterFactory.php

modules/price/src/NumberFormatterFactory.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
 
namespace Drupal\commerce_price;
 
use CommerceGuys\Intl\Formatter\CurrencyFormatterInterface;
 
@trigger_error('The ' . __NAMESPACE__ . '\NumberFormatterFactory is deprecated. Instead, use \Drupal\commerce_price\CurrencyFormatter. See https://www.drupal.org/node/2975672.', E_USER_DEPRECATED);
 
/**
 * Defines the NumberFormatter factory.
 *
 * @deprecated Use \Drupal\commerce_price\CurrencyFormatter instead.
 */
class NumberFormatterFactory implements NumberFormatterFactoryInterface {
 
  /**
   * The currency formatter.
   *
   * @var \CommerceGuys\Intl\Formatter\CurrencyFormatterInterface
   */
  protected $currencyFormatter;
 
  /**
   * Constructs a new NumberFormatterFactory object.
   *
   * @param \CommerceGuys\Intl\Formatter\CurrencyFormatterInterface $currency_formatter
   *   The currency formatter.
   */
  public function __construct(CurrencyFormatterInterface $currency_formatter) {
    $this->currencyFormatter = $currency_formatter;
  }
 
  /**
   * {@inheritdoc}
   */
  public function createInstance() {
    return new LegacyNumberFormatter($this->currencyFormatter);
  }
 
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc