From 30e2eafa86c4c7b6b39cea3e7089a90df9f603fb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2018 16:45:46 +0300 Subject: [ci skip] 3.1.9 release --- user_guide_src/source/helpers/inflector_helper.rst | 96 ---------------------- 1 file changed, 96 deletions(-) delete mode 100644 user_guide_src/source/helpers/inflector_helper.rst (limited to 'user_guide_src/source/helpers/inflector_helper.rst') diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst deleted file mode 100644 index df0c568c0..000000000 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ /dev/null @@ -1,96 +0,0 @@ -################ -Inflector Helper -################ - -The Inflector Helper file contains functions that permits you to change -**English** words to plural, singular, camel case, etc. - -.. contents:: - :local: - -.. raw:: html - -
- -Loading this Helper -=================== - -This helper is loaded using the following code:: - - $this->load->helper('inflector'); - -Available Functions -=================== - -The following functions are available: - - -.. php:function:: singular($str) - - :param string $str: Input string - :returns: A singular word - :rtype: string - - Changes a plural word to singular. Example:: - - echo singular('dogs'); // Prints 'dog' - -.. php:function:: plural($str) - - :param string $str: Input string - :returns: A plural word - :rtype: string - - Changes a singular word to plural. Example:: - - echo plural('dog'); // Prints 'dogs' - -.. php:function:: camelize($str) - - :param string $str: Input string - :returns: Camelized string - :rtype: string - - Changes a string of words separated by spaces or underscores to camel - case. Example:: - - echo camelize('my_dog_spot'); // Prints 'myDogSpot' - -.. php:function:: underscore($str) - - :param string $str: Input string - :returns: String containing underscores instead of spaces - :rtype: string - - Takes multiple words separated by spaces and underscores them. - Example:: - - echo underscore('my dog spot'); // Prints 'my_dog_spot' - -.. php:function:: humanize($str[, $separator = '_']) - - :param string $str: Input string - :param string $separator: Input separator - :returns: Humanized string - :rtype: string - - Takes multiple words separated by underscores and adds spaces between - them. Each word is capitalized. - - Example:: - - echo humanize('my_dog_spot'); // Prints 'My Dog Spot' - - To use dashes instead of underscores:: - - echo humanize('my-dog-spot', '-'); // Prints 'My Dog Spot' - -.. php:function:: is_countable($word) - - :param string $word: Input string - :returns: TRUE if the word is countable or FALSE if not - :rtype: bool - - Checks if the given word has a plural version. Example:: - - is_countable('equipment'); // Returns FALSE \ No newline at end of file -- cgit v1.2.3-24-g4f1b