Skip to end of metadata
Go to start of metadata

<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 Framework: Zend_Filter_Newline Component Proposal

Proposed Component Name Zend_Filter_Newline
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_Newline
Proposers Thomas Weidner
Zend Liaison TBD
Revision 1.0 - 8 August 2009: Initial Draft. (wiki revision: 12)

Table of Contents

1. Overview

Zend_Filter_Newline is a filter which handles conversion between various line termination styles used on different architectures.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will support Windows, Unix, Mac, Native and custom line terminators
  • This component will also support Unicode line terminators
  • This component will allow to replace newlines with arbitrary text

4. Dependencies on Other Framework Components

  • Zend_Filter_Interface
  • Zend_View_Helper_Newline

5. Theory of Operation

Zend_Filter_Newline is a filter which can change/filter newlines of given strings. It takes also care of unicode line terminators. 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_Newline
  • Zend_View_Helper_Newline

8. Use Cases

UC-01

Converting Mac to Windows

UC-02

Converting Windows-style into '<br />'s

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 04, 2009

    <p>I would recommend making $style optional in the constructor, defaulted to STYLE_NATIVE.</p>

  2. Apr 18, 2009

    <p>Pawel, please tell me if you want to do any further progress with this proposal.<br />
    Otherwise I will take it over, change it to conform, get it approved and integrated.</p>

  3. Aug 07, 2009

    fc

    <p>Thomas, instead of trying to integrate everything you need to the framework, why don't you integrate those things that everyone needs. Don't forget there's a community out there, ask them what they need or if they think this filter is essential to them.</p>

    1. Aug 07, 2009

      <p>I don't get the point.</p>

      <p>This proposal is done by another person/the community.<br />
      So what's the problem when I/the community ask to get this proposal ready for recommendation when I/the community see that there is no progress ?</p>

    2. Aug 07, 2009

      <p>I suppose this is a thing that everybody needs/wants.</p>

      <p>Besides, Thomas just just as much part of the community as you or I...</p>

      1. Aug 07, 2009

        fc

        <p>Dolf, saying "I suppose everybody needs this" only makes it worst. It's better if you tell us why you think this proposal is important to you? Not to everyone else.</p>

        1. Aug 07, 2009

          <p>The nice thing of the proposal process is that if you feel you miss something in ZF, you can propose this yourself and get it into ZF if (part of) the community feels that such new feature would be appreciated. Having said that, I suppose at least part of the community welcomes a zend_filter_convertnewlines, and therefore it would be a nice addition to ZF.</p>

          <p>Though this definitely is not the place for side notes; if you feel I closed an issue where it shouldn't have been, feel free to contact me (not on the wiki). The nice thing of an issue tracker is that people can always reopen issues...</p>

  4. Aug 08, 2009

    <p>I am taking over this proposal and rework it to meet actual standards as there were no responses or actions since 4 months.</p>

  5. Jul 28, 2010

    <p>How are you planning on supporting all unicode line endings? Do these also get their own constants?</p>

    1. Jul 30, 2010

      <p>I am irritated about your question because they already have their own constant:<br />
      NEXTLINE is U+0085<br />
      LINESEPARATOR is U+2028<br />
      and so on...</p>

  6. Aug 03, 2010

    <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, but would like to see this filter provide the ability to filter HTML newlines (<br>, <br />) </p></ac:rich-text-body></ac:macro>

    1. Aug 03, 2010

      <p>Recognising HTML breaks as "native line separator" can be problematic in my eyes.<br />
      I did not add it intentionally.</p>

      1. Aug 12, 2010

        <p>While you may have intentionally not added HTML breaks, simply saying that they are "problematic" is not a good justification. Additionally, for consistency with your StripSpaces proposal, which deals with HTML entities, HTML linebreaks should be included in this proposal.</p>