Req->Doc #74261 [Opn]: ReflectionClassConstant not documented
| From: | nikic@php.net | Date: | Fri, 17 Mar 2017 12:43:59 +0000 |
| Subject: | Req->Doc #74261 [Opn]: ReflectionClassConstant not documented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14510@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74261&edit=1
ID: 74261
Updated by: nikic@php.net
Reported by: cmb@php.net
-Summary: getConstants() should accept filter argument
+Summary: ReflectionClassConstant not documented
Status: Open
-Type: Feature/Change Request
+Type: Documentation Problem
Package: Reflection related
Operating System: *
PHP Version: 7.1.3
Block user comment: N
Private report: N
New Comment:
We already have ::getReflectionConstant() and ::getReflectionConstants(), which return
ReflectionClassConstant. Switching to doc bug.
Previous Comments:
------------------------------------------------------------------------
[2017-03-17 12:35:12] cmb@php.net
Description:
------------
As of PHP 7.1.0 it is possible to explicitly specify the
visibility of class constants. However,
ReflectionClass::getConstants() returns all constants as simple
associative array, and ::getConstant() returns a simple string, so
there is no way to find out which of the constants can be accessed
from outside the class. Therefore, it would be nice if an optional
$filter argument could be passed to ::getConstants() similar to
::getMethods().
Another option would be to implement ReflectionConstant as
suggested in request #45569.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74261&edit=1