|  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
 [2006-10-23 20:17 UTC] judas dot iscariote at gmail dot com
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

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:

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.


Add a Patch

Pull Requests

Add a Pull Request


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: Sat May 18 23:01:31 2024 UTC