From e21a7b27ca77fa3b3a327cdbed96e50ab4b55566 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 20 Sep 2006 23:58:54 +0000 Subject: --- user_guide/helpers/inflector_helper.html | 153 +++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 user_guide/helpers/inflector_helper.html diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html new file mode 100644 index 000000000..0513b8b1a --- /dev/null +++ b/user_guide/helpers/inflector_helper.html @@ -0,0 +1,153 @@ + + + + +Code Igniter User Guide + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

Code Igniter User Guide Version 1.4.0

+
+ + + + + + + + + +
+ + +
+ + + +
+ + +

Inflector Helper

+ +

The Inflector Helper file contains functions that permits you to change words to plural, singular, camel case, etc.

+ + +

Loading this Helper

+ +

This helper is loaded using the following code:

+$this->load->helper('inflector'); + +

The following functions are available:

+ + +

singular()

+ +

Changes a singular word to plural. Example:

+ + +$word = "dogs";
+echo singular($word); // Returns "dog" +
+ + +

plural()

+ +

Changes a plural word to singular. Example:

+ + +$word = "dog";
+echo plural($word); // Returns "dogs" +
+ + +

camelize()

+ +

Changes a string of words separated by spaces or underscores to camel case. Example:

+ + +$word = "my_dog_spot";
+echo camelize($word); // Returns "myDogSpot" +
+ + +

underscore()

+ +

Takes multiple words separated by spaces and underscores them. Example:

+ + +$word = "my dog spot";
+echo underscore($word); // Returns "my_dog_spot" +
+ + +

humanize()

+ +

Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized. Example:

+ + +$word = "my_dog_spot";
+echo humanize($word); // Returns "my dog spot" +
+ + + + + + + + + + + + +
+ + + + + + + \ No newline at end of file -- cgit v1.2.3-24-g4f1b