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_StringTruncate Component Proposal

Proposed Component Name Zend_Filter_StringTruncate
Developer Notes
Proposers Thomas Weidner
Zend Liaison TBD
Revision 1.0 - 8 August 2009: Initial Draft. (wiki revision: 6)

Table of Contents

1. Overview

Zend_Filter_StringTruncate is a filter which truncates strings, regardless of their content.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will truncate strings at a given length
  • This component will also handle multibyte strings

4. Dependencies on Other Framework Components

  • Zend_Filter_Interface
  • Zend_View_Helper_Abstract

5. Theory of Operation

This filter truncates strings to a given length. It's the reverse filter for the StringPad Filter.
For simplicity this filter also adds 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_StringTruncate
  • Zend_View_Helper_StringTruncate

8. Use Cases


Truncate a string at 6 chars


Truncate a string at 6 chars, using ending chars


Truncate a string at 6 chars, using ending chars and additionally get the truncated content


Truncate a string at 6 chars but from the other side

9. Class Skeletons


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