Prefixing names of new filter functions with filter_
| From: | Dan Scott | Date: | Thu, 14 Sep 2006 02:58:37 +0000 |
| Subject: | Prefixing names of new filter functions with filter_ | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-4123@lists.php.net to get a copy of this message | ||
Hmm. Should we take advantage of the EXPERIMENTAL warning on
http://php.net/filter to rename most of the new filter functions to
prefix them with filter_ so that we adhere to CODING_STANDARDS (Naming
Conventions [2])?
Rather than simply prefixing filter_ to the existing functions, I
think we can make the function names more consistent with themselves
and with precedents in PHP docs and other function names with the
following changes:
filter_data -- no change
input_filters_list -> filter_names
input_get_args -> filter_get_variable_array ("variable" matches
terminology in http://php.net/manual/en/language.variables.external.php,
array is explicit)
input_get -> filter_get_variable (will sort alphabetically before
filter_get_variable_array)
input_has_variable -> filter_variable_exists (matches array_key_exists
precedent)
input_name_to_filter -> filter_id
Oh, and theoretically the INPUT_* constants should get a FILTER_ prefix as well.
So I'm throwing that against the wall to see if anything sticks. If
there is agreement to the renaming, I'm pretty sure I can whip up a
patch for the extension / unit tests / docs to get things back in
sync.
Dan