#30398 [WFx]: get_class_methods too greedy
| From: | helly@php.net | Date: | Tue, 12 Oct 2004 22:46:39 +0000 |
| Subject: | #30398 [WFx]: get_class_methods too greedy | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67503@lists.php.net to get a copy of this message | ||
ID: 30398
Updated by: helly@php.net
Reported By: epowell at visi dot com
Status: Wont fix
Bug Type: Feature/Change Request
Operating System: *
PHP Version: 5.*
New Comment:
because we have the functionality already. We shouldn't have those
get_class_*() in the first place because we have reflection. But we
need them for BC with 4 were we didn't hadd reflection.
Previous Comments:
------------------------------------------------------------------------
[2004-10-12 16:21:11] epowell at visi dot com
Well, heck, why not rip out all class functions then?
Reflection API cures all! No need for silly little
things like functions when we can jump through hoops
instead.
You could at least explain why you're refusing to
implement a few lines of C code.
------------------------------------------------------------------------
[2004-10-12 16:18:37] epowell at visi dot com
Well, heck, why not rip out all class functions then?
Reflection API cures all! No need for silly little
things like functions when we can jump through hoops
instead.
You could at least explain why you're refusing to
implement a few lines of C code.
------------------------------------------------------------------------
[2004-10-11 19:52:23] helly@php.net
Use Reflection API instead.
------------------------------------------------------------------------
[2004-10-11 17:31:29] epowell at visi dot com
Description:
------------
PHP5 introduces private,
protected, and public object methods, but there is no
functionality to list just the private or just the
public methods in an object. The get_class_methods()
function will return all method names, regardless of
protection level.
I would like to suggest either overloading the
get_class_methods() function to take a protection level
argument (for example,
$array=get_class_methods($object,'private)) or creation
of a set of functions to do the same
(get_class_public_methods(),
get_class_private_methods()).
Yes, I could use the Reflection API, but that's serious
overkill...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30398&edit=1