You are here

private function FrxControls::is_number in Forena Reports 6.2

Same name and namespace in other branches
  1. 6 plugins/FrxControls.inc \FrxControls::is_number()
  2. 7 plugins/FrxControls.inc \FrxControls::is_number()
  3. 7.2 plugins/FrxControls.inc \FrxControls::is_number()
  4. 7.3 plugins/FrxControls.inc \FrxControls::is_number()
  5. 7.4 plugins/FrxControls.inc \FrxControls::is_number()
1 call to FrxControls::is_number()
FrxControls::number in plugins/FrxControls.inc

File

plugins/FrxControls.inc, line 117
contains various methods for extending report formating, layout, transformation and design.

Class

FrxControls
@file contains various methods for extending report formating, layout, transformation and design.

Code

private function is_number($value) {
  $non_numeric_chars = trim($value, ' +-.,0123456789');

  // Determine if it contains +- in the interior
  // Zero is ok here bu
  $inner_symbols = FALSE;
  if (strpos($value, '+') || strpos($value, '-') || strpos($value, ' ')) {
    $inner_symbols = TRUE;
  }
  return empty($non_numeric_chars) && trim($value) !== '' && !$inner_symbols ? TRUE : FALSE;
}