Skip to end of metadata
Go to start of metadata

Zend Framework: Zend_Filter_Null Component Proposal

Proposed Component Name Zend_Filter_Null
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_Null
Proposers Thomas Weidner
Zend Liaison TBD
Revision 1.0 - 14 June 2009: Initial Draft. (wiki revision: 4)

Table of Contents

1. Overview

Zend_Filter_Null is a component which allows to accept empty values as NULL in case of a database useage.

2. References

[ZF-3808]

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will change values to be NULL
  • This component will allow to change which values should be changed

4. Dependencies on Other Framework Components

  • Zend_Filter_Null

5. Theory of Operation

This component will filter input values to be null. This is needed for databases when a '0' or '' is not equal to NULL.
You can edit which inputs are changed to NULL. Per default the values '' (empty string), 0 (integer or string 0), and
false (boolean false) are changed to NULL.

The filtered value itself can then savely be stored in a database without any change.

6. Milestones / Tasks

  • Milestone 1: [DONE] Proposal finished
  • Milestone 2: [DONE] Proposal accepted
  • Milestone 3: [DONE] Coding finished
  • Milestone 4: [DONE] Unit tests finished
  • Milestone 5: [DONE] Documentation finished
  • Milestone 6: [DONE] Component moved to core

7. Class Index

  • Zend_Filter_Null

8. Use Cases

UC-01
UC-02
UC-03

9. Class Skeletons

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

    looks interesting , this could be very useful

  2. Jun 16, 2009

    +1, I use a similar custom filter.

  3. Jul 28, 2009

    Zend Framework Acceptance
    The Zend Framework Team is pleased to accept this proposal for immediate development in the Standard Incubator.

    We ask that you follow the requirements below when developing the component:

    • Should accept either a bitmask or array of filter types in the constructor
  4. Sep 14, 2009

    Component finished and waiting for acceptance to core.