<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Filter_StringToCapitalize is a simple string filter which lowercases the string and capitalizes each word.Zend Framework: Zend_Filter_StringToCapitalize Component Proposal
Proposed Component Name
Zend_Filter_StringToCapitalize
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_StringToCapitalize
Proposers
Thomas Weidner
Zend Liaison
TBD
Revision
1.0 - 12 April 2010: Initial Draft. (wiki revision: 3)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
- Zend_Filter
5. Theory of Operation
The component is a string filter and can be used like all other filters.
6. Milestones / Tasks
- 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
7. Class Index
- Zend_Filter_StringToCapitalize
8. Use Cases
| UC-01 |
|---|
Default usage
INPUT : "my input"
OUTPUT: "My Input"
| UC-02 |
|---|
Encoding
INPUT : "my ärger"
OUTPUT: "My Ärger"
| UC-03 |
|---|
Only first word
INPUT : "my ärger"
OUTPUT: "My ärger"
7 Comments
comments.show.hideApr 12, 2010
Thomas Weidner
<p>One thing to mention:<br />
Do we want to have the several casing variants diverted into seperate filters, or is it convinient to have one filter for all variants.</p>
<p>get my content - lower (already done by StringToLower)<br />
GET MY CONTENT - upper (already done by StringToUpper)<br />
Get My Content - word<br />
Get my content - first</p>
Jul 28, 2010
Dolf Schimmel (Freeaqingme)
<p>I'd personally prefer to have this in one filter.</p>
<p>Also, why can't this class accept arrays as well?</p>
Jul 30, 2010
Thomas Weidner
<p>All string filters should behave the same way.<br />
It would be no good if this single string filter behaves different than all other string filters.</p>
<p>When there is a good usecase for string filters to support arrays in addition to strings then all filters should support it.</p>
Apr 13, 2010
Benjamin
<p>In 2. it's <a href="http://php.net/mb_convert_case">mb_convert_case</a> instead of mb_case_convert.</p>
Aug 03, 2010
Dolf Schimmel (Freeaqingme)
<ac:macro ac:name="note"><ac:rich-text-body><p><strong>Community Review Team Recommendation</strong></p>
<p>The CR Team advises that this proposal be approved, and suggests this component then also implements the (de)capitalization of entire strings, preparing for a possible removing of StringToUpper and StringToLower in ZF2. Also we suggest to reconsider the name, e.g. Zend_Filter_StringCase.</p></ac:rich-text-body></ac:macro>
Aug 03, 2010
Thomas Weidner
<p>Note:<br />
I was said from my Zend liaison that functionallity has to be divided into several proposals.<br />
This would also be true for ToLower/ToUpper. I have no problem to concate them into a single filter when it's really wished to do so.</p>
<p>Note2:<br />
For ZF 2.0 it would be better to move all explicit "string" Filters to the namespace<br />
"Zend_Filter_String_"... therefor my proposed name would be "Zend_Filter_String_Case"</p>
Aug 12, 2010
Matthew Weier O'Phinney
<p>While your liaison may have recommended this in the past, the CR Team has a good argument, and my team and I agree with what they recommend. It will mean a little overlap of functionality in ZF1, but the StringToUpper and StringToLower filters can then be removed in ZF2.</p>
<p>As for reorganization of the filter namespace, that debate has moved to the zf-contributors mailing list.</p>