public static function objToArray($var, $lowerCaseKeys = true)
    {
        if (\is_object($var)) {
            $var = \get_object_vars($var);
        }
        if (\is_array($var)) {
            if ($lowerCaseKeys) {
                $var = \array_change_key_case($var);
            }
            foreach ($var as $k => $v) {
                $var[$k] = self::objToArray($v, $lowerCaseKeys);
            }
        }
        if (\is_string($var)) {
            $var = \trim($var);
        }
        return $var;
    }