<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Filter_StringPad is a filter which allows to extend strings to a specific length.Zend Framework: Zend_Filter_StringPad Component Proposal
Proposed Component Name
Zend_Filter_StringPad
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_StringPad
Proposers
Thomas Weidner
Zend Liaison
TBD
Revision
1.0 - 23 July 2009: Initial Draft. (wiki revision: 3)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will correctly handle multi byte strings.
- This component will support the same parameters as PHP's own str_pad method.
4. Dependencies on Other Framework Components
Zend_Filter_Interface
Zend_View_Helper_Abstract
5. Theory of Operation
This filter extends given strings to the wished length. It accepts and other string for extension/padding and default to whitespace if non is given.
It also supports extension from left, right or both sides.
For simplicity this component adds also a view helper which makes use of this filter.
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_StringPad
- Zend_View_Helper_StringPad
8. Use Cases
| UC-01 |
|---|
Extends a string to 15 chars
| UC-02 |
|---|
Extends a string to 15 chars, using another pad char
| UC-03 |
|---|
Extends a string to 15 chars, using another pad char and another direction