You are here

protected function SchemaForm::stringToCamelCase in Entity Construction Kit (ECK) 7.3

Helper function to turn a string to camel case.

Parameters

string $string: A string.

Return value

string The camel case version of the string.

1 call to SchemaForm::stringToCamelCase()
SchemaForm::getSchemaForm in ./eck.schema.inc
Generate a form api form from the given schema.

File

./eck.schema.inc, line 36
A helper class to create schema forms

Class

SchemaForm
@file A helper class to create schema forms

Code

protected function stringToCamelCase($string) {
  $pieces = explode(" ", $string);
  foreach ($pieces as $key => $piece) {
    if ($key > 0) {
      $pieces[$key] = ucfirst($piece);
    }
  }
  return implode("", $pieces);
}