public function changeKeyCase($case)
    {
        // validate case
        $case = new StringObject($case);
        $case->caseLower();
        $realCase = '';
        if ($case->equals('lower')) {
            $realCase = CASE_LOWER;
        } else {
            if ($case->equals('upper')) {
                $realCase = CASE_UPPER;
            } else {
                throw new ArrayObjectException(ArrayObjectException::MSG_PARAM_VALUE_OUT_OF_SCOPE, [
                    '$case',
                    '"lower" or "upper"'
                ]);
            }
        }

        $this->val(array_change_key_case($this->val(), $realCase));

        return $this;
    }