View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}




1.0 - 12 April 2010: Initial Draft.

Zend_Filter_StringToCapitalize is a simple string filter which lowercases the string and capitalizes each word.

* [ucfirst|]
* [mb_case_convert|]

* This component *will* capitalize strings by lowercasing them and uppercasing the first character of each word
* This component *will* only work on strings

* Zend_Filter

The component is a string filter and can be used like all other filters.

* Milestone 1: \[DONE\] Proposal finished
* Milestone 2: Proposal accepted
* Milestone 3: Working implementation
* Milestone 4: Unit tests
* Milestone 5: Documentation
* Milestone 6: Moved to core

* Zend_Filter_StringToCapitalize

Default usage
$filter = new Zend_Filter_StringToCapitalize();
INPUT : "my input"
OUTPUT: "My Input"
$filter = new Zend_Filter_StringToCapitalize(array('encoding' => 'UTF-8'));
INPUT : "my ärger"
OUTPUT: "My Ärger"
Only first word
$filter = new Zend_Filter_StringToCapitalize(array('case' => 'first'));
INPUT : "my ärger"
OUTPUT: "My ärger"

class Zend_Filter_StringToCapitalize {
public function getEncoding();
public function setEncoding($encoding);
public function getCase();
public function setCase($case);
public function filter($value);