src/Environaut/Config/Reader/Dom/DomElement.php
public static function literalize($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        $value = trim($value);
        if ($value == '') {
            return null;
        }

        $lc_value = strtolower($value);
        if ($lc_value === 'on' || $lc_value === 'yes' || $lc_value === 'true') {
            return true;
        } elseif ($lc_value === 'off' || $lc_value === 'no' || $lc_value === 'false') {
            return false;
        }

        return $value;
    }
public static function literalize($value)
    {
        if (!is_string($value)) {
            return $value;
        }

        $value = trim($value);
        if ($value == '') {
            return null;
        }

        $lc_value = strtolower($value);
        if ($lc_value === 'on' || $lc_value === 'yes' || $lc_value === 'true') {
            return true;
        } elseif ($lc_value === 'off' || $lc_value === 'no' || $lc_value === 'false') {
            return false;
        }

        return $value;
    }
Returns the literalized value, that is:
- 'on|yes|true' will be boolean TRUE
- 'off|no|false' will be boolean FALSE
- '' will be NULL

All other non-string values will be returned as is.

@param mixed $value value to literalize

@return mixed null or boolean value or the original value of it's not a string