You are here

public function LegacyNumberFormatter::parse in Commerce Core 8.2

Parses a formatted number.

Parameters

string $number: The formatted number.

Return value

string|false The parsed number, or FALSE on failure.

File

modules/price/src/LegacyNumberFormatter.php, line 77

Class

LegacyNumberFormatter
Provides a legacy number formatter for the deprecated NumberFormatterFactory.

Namespace

Drupal\commerce_price

Code

public function parse($number) {
  return $this->currencyFormatter
    ->parse($number, 'XXX');
}