diff options
author | Andrey Andreev <narf@devilix.net> | 2014-02-07 22:31:49 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-02-07 22:31:49 +0100 |
commit | 3de130c2da3b93a3404f264e92d7b65354de3548 (patch) | |
tree | 368b1847fffe7af21c5fbc3fa7925212b678e60b /user_guide_src/source/helpers/inflector_helper.rst | |
parent | 1e584208e420d1d864de2bc686d437ecdf0ce064 (diff) |
[ci skip] Add return types to helper docs (+ some other formatting)
Diffstat (limited to 'user_guide_src/source/helpers/inflector_helper.rst')
-rw-r--r-- | user_guide_src/source/helpers/inflector_helper.rst | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/user_guide_src/source/helpers/inflector_helper.rst b/user_guide_src/source/helpers/inflector_helper.rst index 717ecc678..d0cb17c18 100644 --- a/user_guide_src/source/helpers/inflector_helper.rst +++ b/user_guide_src/source/helpers/inflector_helper.rst @@ -28,50 +28,51 @@ The following functions are available: .. function:: singular($str) :param string $str: Input string - :returns: string + :returns: A singular word + :rtype: string Changes a plural word to singular. Example:: echo singular('dogs'); // Prints 'dog' - .. function:: plural($str) :param string $str: Input string - :returns: string + :returns: A plular word + :rtype: string Changes a singular word to plural. Example:: echo plural('dog'); // Prints 'dogs' - .. function:: camelize($str) :param string $str: Input string - :returns: 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' - .. function:: underscore($str) :param string $str: Input string - :returns: 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' - .. function:: humanize($str[, $separator = '_']) :param string $str: Input string :param string $separator: Input separator - :returns: string + :returns: Humanized string + :rtype: string Takes multiple words separated by underscores and adds spaces between them. Each word is capitalized. @@ -84,11 +85,11 @@ The following functions are available: echo humanize('my-dog-spot', '-'); // Prints 'My Dog Spot' - .. function:: is_countable($word) :param string $word: Input string - :returns: bool + :returns: TRUE if the word is countable or FALSE if not + :rtype: bool Checks if the given word has a plural version. Example:: |