public function LegacyNumberFormatter::parse in Price 8
Same name and namespace in other branches
- 3.x src/LegacyNumberFormatter.php \Drupal\price\LegacyNumberFormatter::parse()
- 3.0.x src/LegacyNumberFormatter.php \Drupal\price\LegacyNumberFormatter::parse()
Parses a formatted number.
Parameters
string $number: The formatted number.
Return value
string|false The parsed number, or FALSE on failure.
File
- src/
LegacyNumberFormatter.php, line 77
Class
- LegacyNumberFormatter
- Provides a legacy number formatter for the deprecated NumberFormatterFactory.
Namespace
Drupal\priceCode
public function parse($number) {
return $this->currencyFormatter
->parse($number, 'XXX');
}