public function camelize($input)
    {
        $input = trim($input);

        if (empty($input))
        {
            throw new \Exception("Can not camelize an empty string.");
        }

        $output = '';
        $capitalizeNext = $this->shouldCapitalizeFirstLetter;

        for ($i = 0; $i < mb_strlen($input); ++$i)
        {
            $character = mb_substr($input, $i, 1);

            if ($character == '_' || $character == ' ')
            {
                $capitalizeNext = true;
            }
            else
            {
                if ($capitalizeNext)
                {
                    $capitalizeNext = false;
                    $output .= mb_strtoupper($character);
                }
                else
                {
                    $output .= mb_strtolower($character);
                }
            }
        }

        return $output;
    }