InflectorInflector for pluralize and singularize English nouns.
Inflector for pluralize and singularize English nouns. This Inflector is a port of Ruby on Rails Inflector. It can be really helpful for developers that want to create frameworks based on naming conventions rather than configurations. It was ported to PHP for the Akelos Framework, a multilingual Ruby on Rails like framework for PHP that will be launched soon.
Located in /application/libraries/Inflector.php (line 38)
Returns given word as CamelCased
Returns given word as CamelCased Converts a word like "send_email" to "SendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "WhoSOnline"
Converts a table name to its class name according to rails naming conventions.
Converts a table name to its class name according to rails naming conventions. Converts "people" to "Person"
Returns a human-readable string from $word Returns a human-readable string from $word, by replacing underscores with a space, and by upper-casing the initial character by default.
Returns a human-readable string from $word Returns a human-readable string from $word, by replacing underscores with a space, and by upper-casing the initial character by default. If you need to uppercase all the words you just have to pass 'all' as a second parameter.
Converts number to its ordinal English form.
Converts number to its ordinal English form. This method converts 13 to 13th, 2 to 2nd ...
Pluralizes English nouns.
Pluralizes English nouns.
Singularizes English nouns.
Singularizes English nouns.
Converts a class name to its table name according to rails naming conventions.
Converts a class name to its table name according to rails naming conventions. Converts "Person" to "people"
Converts an underscored or CamelCase word into a English sentence.
Converts an underscored or CamelCase word into a English sentence. The titleize function converts text like "WelcomePage", "welcome_page" or "welcome page" to this "Welcome Page". If second parameter is set to 'first' it will only capitalize the first character of the title.
Converts a word "into_it_s_underscored_version" Convert any "CamelCased" or "ordinary Word" into an "underscored_word".
Converts a word "into_it_s_underscored_version" Convert any "CamelCased" or "ordinary Word" into an "underscored_word". This can be really useful for creating friendly URLs.
Same as camelize but first char is underscored
Same as camelize but first char is underscored Converts a word like "send_email" to "sendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "whoSOnline"
Documentation generated on Fri, 05 Jun 2009 13:57:45 -0400 by phpDocumentor 1.4.2