Esempio n. 1
0
 /**
  * Formats a number into the correct locale format to show deltas (signed differences in value).
  *
  * ### Options
  *
  * - `places` - Minimum number or decimals to use, e.g 0
  * - `precision` - Maximum Number of decimal places to use, e.g. 2
  * - `locale` - The locale name to use for formatting the number, e.g. fr_FR
  * - `before` - The string to place before whole numbers, e.g. '['
  * - `after` - The string to place after decimal numbers, e.g. ']'
  * - `escape` - Set to false to prevent escaping
  *
  * @param float $value A floating point number
  * @param array $options Options list.
  * @return string formatted delta
  */
 public function formatDelta($value, array $options = [])
 {
     $formatted = $this->_engine->formatDelta($value, $options);
     $options += ['escape' => true];
     return $options['escape'] ? h($formatted) : $formatted;
 }