Class Helper_Upper_First

Overview

Helper class to capitalize first letter of sentence/word.

Simple quick function to make a sentence/word into a Sentence Case, first letter is capitalize all others are lower case. Yes, PHP has "ucfirst()", but it has a flaw; it does not effect any other letters of a given string. If any of them are uppercase, they stay uppercase. This method forces all letters to lower and then caps the first.

author: Walter Torres <walter@torres.ws>
version: $Revision: 1.0 $
example: example not found

Located in /helper/upper_first.php (line 62)


	
    		        
Method Summary
void __construct (void 0)
string helper ([ $_args = array()])
Methods
Constructor __construct (line 83)

Each Helper class has to have an empty __construct method

final:
access: public
void __construct (void 0)
  • void 0
helper (line 106)

Helper class to capitalize first letter of sentence/word.

Simple quick function to make a sentence/word into a Sentence Case, first letter is capitalize all others are lower case. Yes, PHP has "ucfirst()", but it has a flaw; it does not effect any other letters of a given string. If any of them are uppercase, they stay uppercase. This method forces all letters to lower and then caps the first.

Method arguments are actually sent within an indexed array.

return: String that was changed
access: public
string helper ([ $_args = array()])
  • array $_args: Method arguments are sent within an indexed array

Documentation generated on Tue, 18 Aug 2009 02:30:18 -0500 by phpDocumentor 1.4.2