php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57320 Please provide a built in filter class
Submitted: 2006-10-23 20:17 UTC Modified: 2006-10-23 20:46 UTC
From: judas dot iscariote at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: filter (PECL)
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 44 = ?
Subscribe to this entry?

 
 [2006-10-23 20:17 UTC] judas dot iscariote at gmail dot com
Description:
------------
Will be nice if the filter extension can provide ( maybe for 5.2.1) a built-in, consistent and **ease of use** OOP interface.

I know this can be implemented in userspace, but its much better to have it into the extension.

Something like http://framework.zend.com/manual/en/zend.filter.html

Don't get me wrong, I really like this idea, however, I think programmers out there will be unlikely to use this extension 'cause the lack of an abstract easy way to use it, too much constants, only procedural interface..etc..


actually, if you don't want to ..may I ask Marcus  to implement something like this on SPL.. ? :-)

"SPL is a collection of interfaces and classes that are meant to solve standard problems."

Input filter validation is clearly an standard problem ;-)



Reproduce code:
---------------
nothing..





Expected result:
----------------
well.. I expect **something** like this.


a) a group of get_*() methods acting like FILTER_SANITIZE_* constants.

b) a group of is_* methods acting like  FILTER_VALIDATE_* ..

this is a really basic description of course.







Actual result:
--------------
no class implemented.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-23 20:46 UTC] pierre dot php at gmail dot com
An object oriented interface is not on our roadmap (as discussed in the internals mailing list).

However, as we just discussed on IRC, examples of classes using the filter extension are welcome and can be added to the "docs" or "examples" directory.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC