src/Genesis/Utils/Common.php
public static function stringToBoolean($string)
    {
        $flag = filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

        if ($flag) {
            return true;
        } elseif (is_null($flag)) {
            return $string;
        }

        return false;
    }
public static function stringToBoolean($string)
    {
        $flag = filter_var($string, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

        if ($flag) {
            return true;
        } elseif (is_null($flag)) {
            return $string;
        }

        return false;
    }
public static function stringToBoolean ( $ string ) { $ flag = filter_var ( $ string , FILTER_VALIDATE_BOOLEAN , FILTER_NULL_ON_FAILURE ) ; if ( $ flag ) { return true ; } elseif ( is_null ( $ flag ) ) { return $ string ; } return false ; }
Evaluate a boolean expression from String
or return the string itself

@param $string

@return bool | string
Evaluate a boolean expression from String or return the string itself