public function camelize($base)
    {
        $callback = create_function('$c', 'return strtoupper($c[1]);');

        if (!is_array($base)) {
            return preg_replace_callback('/_([a-z])/', $callback, $base);
        }

        foreach ($base as $key => $val) {
            unset($base[$key]);
            $newKey = preg_replace_callback('/_([a-z])/', $callback, $key);
            $base[$newKey] = $val;
        }

        return $base;
    }