Elgg  Version 1.9
extender.php
Go to the documentation of this file.
1 <?php
21 function detect_extender_valuetype($value, $value_type = "") {
22  if ($value_type != "" && ($value_type == 'integer' || $value_type == 'text')) {
23  return $value_type;
24  }
25 
26  // This is crude
27  if (is_int($value)) {
28  return 'integer';
29  }
30  // Catch floating point values which are not integer
31  if (is_numeric($value)) {
32  return 'text';
33  }
34 
35  return 'text';
36 }
$value
Definition: longtext.php:29
detect_extender_valuetype($value, $value_type="")
Detect the value_type for a given value.
Definition: extender.php:21