protected function convertCase($request)
    {
        $inflector = new Inflector();
        switch ($this->defaultCaseFormat) {
            // assume camel case and should convert to snake
            case "snake":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToSnake($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToSnake($request);
                }

                break;

            // assume snake and should convert to camel
            case "camel":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToCamel($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToCamel($request);
                }
                break;
            default:
                break;
        }
        return $request;
    }
protected function convertCase($request)
    {
        $inflector = new Inflector();
        switch ($this->defaultCaseFormat) {
            // assume camel case and should convert to snake
            case "snake":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToSnake($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToSnake($request);
                }

                break;

            // assume snake and should convert to camel
            case "camel":
                if (is_object($request)) {
                    $request = $inflector->objectPropertiesToCamel($request);
                } elseif (is_array($request)) {
                    $request = $inflector->arrayKeysToCamel($request);
                }
                break;
            default:
                break;
        }
        return $request;
    }
protected function convertCase ( $ request ) { $ inflector = new Inflector ( ) ; switch ( $ this -> defaultCaseFormat ) { // assume camel case and should convert to snake case "snake" : if ( is_object ( $ request ) ) { $ request = $ inflector -> objectPropertiesToSnake ( $ request ) ; } elseif ( is_array ( $ request ) ) { $ request = $ inflector -> arrayKeysToSnake ( $ request ) ; } break ; // assume snake and should convert to camel case "camel" : if ( is_object ( $ request ) ) { $ request = $ inflector -> objectPropertiesToCamel ( $ request ) ; } elseif ( is_array ( $ request ) ) { $ request = $ inflector -> arrayKeysToCamel ( $ request ) ; } break ; default : break ; } return $ request ; }
for a given array of values, convert cases to the defaultCaseFormat

@param array|object $request
@return array|object
for a given array of values convert cases to the defaultCaseFormat