public static function toCamelCase($str)
  {
    // Convert words to uppercase and then remove spaces.
    $str = self::toSpaceSeparated($str);
    $str = ucwords($str);
    $str = str_ireplace(' ', '', $str);

    return $str;
  }