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.
<ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Framework Acceptance</ac:parameter><ac:rich-text-body>
<p>The Zend Framework Team is pleased to accept this proposal for immediate development in the Standard Incubator.</p>
<p>We ask that you follow the requirements below when developing the component:</p>
<ul>
<li>Should accept either a bitmask or array of filter types in the constructor</li>
</ul>
</ac:rich-text-body></ac:macro>
4 Comments
comments.show.hideJun 15, 2009
Kamil Nowakowski
<p>looks interesting , this could be very useful </p>
Jun 16, 2009
bullfrogblues
<p>+1, I use a similar custom filter. </p>
Jul 28, 2009
Matthew Weier O'Phinney
<ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Framework Acceptance</ac:parameter><ac:rich-text-body>
<p>The Zend Framework Team is pleased to accept this proposal for immediate development in the Standard Incubator.</p>
<p>We ask that you follow the requirements below when developing the component:</p>
<ul>
<li>Should accept either a bitmask or array of filter types in the constructor</li>
</ul>
</ac:rich-text-body></ac:macro>
Sep 14, 2009
Thomas Weidner
<p>Component finished and waiting for acceptance to core.</p>