Class Inflector

Description

Pluralize and singularize English words.

Inflector pluralizes and singularizes English nouns.

Inflector is taken from CakePHP project. Thanks!

Located in /environment/classes/Inflector.class.php (line 12)


	
			
Method Summary
static string camelize (string $lower_case_and_underscored_word)
static string humanize (string $lower_case_and_underscored_word)
static string pluralize (string $word)
static string singularize (string $word)
static string underscore (string $camel_cased_word)
Methods
static method camelize (line 108)

Returns given $lower_case_and_underscored_word as a camelCased word.

  • return: Camelized word. likeThis.
static string camelize (string $lower_case_and_underscored_word)
  • string $lower_case_and_underscored_word: Word to camelize
static method humanize (line 130)

Returns a human-readable string from $lower_case_and_underscored_word, by replacing underscores with a space, and by upper-casing the initial characters.

  • return: Human-readable string
static string humanize (string $lower_case_and_underscored_word)
  • string $lower_case_and_underscored_word: String to be made more readable
static method pluralize (line 20)

Return $word in plural form.

  • return: Word in plural
static string pluralize (string $word)
  • string $word: Word in singular
static method singularize (line 60)

Return $word in singular form.

  • return: Word in singular
static string singularize (string $word)
  • string $word: Word in plural
static method underscore (line 118)

Returns an underscore-syntaxed ($like_this_dear_reader) version of the $camel_cased_word.

  • return: Underscore-syntaxed version of the $camel_cased_word
static string underscore (string $camel_cased_word)
  • string $camel_cased_word: Camel-cased word to be "underscorized"

Documentation generated on Wed, 23 Jan 2008 01:58:47 +0000 by phpDocumentor 1.4.0