Doc #74261 [Opn]: ReflectionClassConstant not documented

From: Date: Fri, 17 Mar 2017 12:58:20 +0000
Subject: Doc #74261 [Opn]: ReflectionClassConstant not documented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14511@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: cmb@php.net Reported by: cmb@php.net Summary: ReflectionClassConstant not documented Status: Open Type: Documentation Problem Package: Reflection related Operating System: * PHP Version: 7.1.3 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks, Nikita! Previous Comments: ------------------------------------------------------------------------ [2017-03-17 12:43:57] nikic@php.net We already have ::getReflectionConstant() and ::getReflectionConstants(), which return ReflectionClassConstant. Switching to doc bug. ------------------------------------------------------------------------ [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

« previous php.doc.bugs (#14511) next »