isBoolean() 공개 정적인 메소드

Evaluate the input string and returns true if it can be converted to a boolean.
public static isBoolean ( $str ) : boolean
$str
리턴 boolean
 /**
  * Evaluate the input variable and if the string can be converted to either
  * a boolean, float or integer converts it and return that value.
  * Otherwise simply return the inout variable unchanged.
  *
  * @param $value
  * @return bool|float|int|misc
  */
 public static function correctType($value)
 {
     try {
         if (Str::isBoolean($value)) {
             $value = Str::toBoolean($value);
         } elseif (is_float($value)) {
             $value = floatval($value);
         } elseif (is_int($value)) {
             $value = intval($value);
         }
     } catch (Exception $ex) {
     }
     return $value;
 }