Exemplo n.º 1
0
 /**
  * - Searches GET and POST data for the variable value matching $key.
  * - Validates the value & returns an integer value only if the intput
  * value is numeric.
  * @param string $key Name of the input parameter holding the value of interest.
  * @param integer $index (Optional) index within input array of the value of interest.
  * @return mixed Float or integer value.
  */
 public static function parseNumericInput($key, $index = null, $src = null)
 {
     $value = Validation::_parseInput(FILTER_VALIDATE_FLOAT, $key, $index, $src);
     return is_numeric($value) ? $value : null;
 }