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

<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: 6)

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 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


Extends a string to 15 chars


Extends a string to 15 chars, using another pad char


Extends 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.