From 2067d1a727e7eb5e5ffb40e967f3d1fc4c8a41b2 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 13 Nov 2008 22:59:24 +0000 Subject: Changing EOL style to LF --- user_guide/helpers/inflector_helper.html | 300 +++++++++++++++---------------- 1 file changed, 150 insertions(+), 150 deletions(-) (limited to 'user_guide/helpers/inflector_helper.html') diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html index b93a9c01f..323caf5cc 100644 --- a/user_guide/helpers/inflector_helper.html +++ b/user_guide/helpers/inflector_helper.html @@ -1,151 +1,151 @@ - - - - - -Inflector Helper : CodeIgniter User Guide - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

CodeIgniter User Guide Version 1.7

-
- - - - - - - - - -
- - -
- - - -
- - -

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 plural word to singular. Example:

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

plural()

- -

Changes a singular word to plural. Example:

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

To force a word to end with "es" use a second "true" argument.

- $word = "pass";
-echo plural($word, TRUE); // Returns "passes"
- -

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" -
- - - - - - - - - - - - -
- - - - - - + + + + + +Inflector Helper : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 1.7

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

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 plural word to singular. Example:

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

plural()

+ +

Changes a singular word to plural. Example:

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

To force a word to end with "es" use a second "true" argument.

+ $word = "pass";
+echo plural($word, TRUE); // Returns "passes"
+ +

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