/** * Less equals than * * @access public * @param string * @return bool */ public function less_equals_than($str, $max) { $valor = numeroParaGravacao($str); if (!is_numeric($valor)) { return FALSE; } return $valor <= $max; }
private function changeNumericFieldsFormatForSave(&$dbArray) { if (is_array($this->numeric_fields)) { foreach ($dbArray as $key => $value) { if (in_array($key, $this->numeric_fields) && !is_numeric($value)) { $dbArray[$key] = numeroParaGravacao($value); } } } }