Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History
New Proposal Template
This page has been created from a template that uses "zones." To proceed:
  1. Edit the page
  2. Replace sample content within each zone-data tag with your own content
  3. Remove this notice
  4. Save the page
  5. When you are ready for community review, move this page to the Ready for Review section on the edit page.
No placeholders allowed!
Please do not create placeholders. Wait until you have sufficient content to replace all sample data in the proposal template before creating your proposal document.

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Filter_StringPad Component Proposal

Proposed Component Name Zend_Filter_StringPad
Developer Notes
Proposers Thomas Weidner
Zend Liaison TBD
Revision 1.0 - 23 July 2009: Initial Draft. (wiki revision: 2)

Table of Contents

1. Overview

Zend_Filter_StringPad is a filter which allows to extend strings to a specific length.

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


5. Theory of Operation

This filter extends given strings to the wished length. It accepts and other string for padding and default to whitespace if non is given.
It also supports padding 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


Pad a string to 15 chars


Pad a string to 15 chars, using another pad char


Pad a string to 15 chars, using another pad char and another direction

9. Class Skeletons


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.