getValue() public method

Returns control's value.
public getValue ( ) : string
return string
Example #1
0
 /**
  * Rangle validator: is a control's value number in specified range?
  * @param  TextBase
  * @param  array  min and max value pair
  * @return bool
  */
 public static function validateRange(TextBase $control, $range)
 {
     return ($range[0] === NULL || $control->getValue() >= $range[0]) && ($range[1] === NULL || $control->getValue() <= $range[1]);
 }
Example #2
0
 /**
  * Rangle validator: is a control's value number in specified range?
  * @param  TextBase
  * @param  array  min and max value pair
  * @return bool
  */
 public static function validateRange(TextBase $control, $range)
 {
     return Validators::isInRange($control->getValue(), $range);
 }
Example #3
0
 /**
  * Is a control's value float number?
  * @return bool
  * @internal
  */
 public static function validateFloat(TextBase $control)
 {
     $value = self::filterFloat($control->getValue());
     if (Validators::isNumeric($value)) {
         $control->setValue((double) $value);
         return TRUE;
     }
     return FALSE;
 }
Example #4
0
 /**
  * Float validator: is each value of tag of control value float number?
  * @param  TextBase
  * @return bool
  */
 public static function validateFloat(TextBase $control)
 {
     foreach ($control->getValue() as $tag) {
         if (!Strings::match($tag, '/^-?[0-9]*[.,]?[0-9]+$/')) {
             return FALSE;
         }
     }
     return TRUE;
 }
Example #5
0
Validators::isNumeric(static::filterFloat($control->getValue()));}static
function
validateRange(TextBase$control,$range){return
Validators::isInRange($control->getValue(),$range);}static
Example #6
0
 /**
  * Float validator: is a control's value float number?
  * @param  TextBase
  * @return bool
  */
 public static function validateFloat(TextBase $control)
 {
     return Validators::isNumeric(static::filterFloat($control->getValue()));
 }